-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display.drawString() cannot utilize the first rows of the display #369
Comments
Hi |
Thanks for your response. Supplying a negative offset didn't work for me. I've attached a ZIP of the OLEDDisplayFonts.h I'm using - the only difference from the original is the Sans Serif 34 added just after the Arial 24. Font was compiled on macOS using the web tool suggested in the library's README.md |
Yes you are right, I tested the following on a heltec_wifi_lora_32_V2:
But there is a 2 pixel gap to the top edge |
Thanks for repeating the problem. I believe a large font will add more “dead” pixels, I guess 5-6 at 34pt. Can I expect a fix soon? Do you know a workaround or tweak? I made some lame attempts to adjust the Y (height) setting in fonts.h that did not have any effect. |
hmm... currently I'm not involved in the development of the library. I'm just an "user" ;-) Maybe this is not a bug but a feature. Text needs to be some distance from the edge for 'aesthetic' reasons. I do not know. Or there is a hidden parameter to switch this off. |
Since I can draw text to the far bottom, I expect to be able to draw to far top as well. I'm in no jam, just not able to use nearly 10% of the height of the display for two rows of a 34pt font. If this bug gets corrected I guess I can squeeze some more point into the font tool until the two rows of temperature readings fully occupy the full 64 pixels of the display (with a couple of blank rows in between). I hope some dev or "maintenance squad" can add their thoughts. |
The tool that generates the fonts seems to be the thing at fault here, I was able to get the default arial 10 font to go all the way up to the top of the screen by shifting the font data 3 bits up. const uint8_t ArialMT_Plain_10_fixed[] = {
0x0A, // Width: 10
0x0D, // Height: 13
0x20, // First Char: 32
0xE0, // Numbers of Chars: 224
// Jump Table:
0xFF, 0xFF, 0x00, 0x03, // 32:65535
0x00, 0x00, 0x04, 0x03, // 33:0
0x00, 0x04, 0x05, 0x04, // 34:4
0x00, 0x09, 0x09, 0x06, // 35:9
0x00, 0x12, 0x0A, 0x06, // 36:18
0x00, 0x1C, 0x10, 0x09, // 37:28
0x00, 0x2C, 0x0E, 0x07, // 38:44
0x00, 0x3A, 0x01, 0x02, // 39:58
0x00, 0x3B, 0x06, 0x03, // 40:59
0x00, 0x41, 0x06, 0x03, // 41:65
0x00, 0x47, 0x05, 0x04, // 42:71
0x00, 0x4C, 0x09, 0x06, // 43:76
0x00, 0x55, 0x04, 0x03, // 44:85
0x00, 0x59, 0x03, 0x03, // 45:89
0x00, 0x5C, 0x04, 0x03, // 46:92
0x00, 0x60, 0x05, 0x03, // 47:96
0x00, 0x65, 0x0A, 0x06, // 48:101
0x00, 0x6F, 0x08, 0x06, // 49:111
0x00, 0x77, 0x0A, 0x06, // 50:119
0x00, 0x81, 0x0A, 0x06, // 51:129
0x00, 0x8B, 0x0B, 0x06, // 52:139
0x00, 0x96, 0x0A, 0x06, // 53:150
0x00, 0xA0, 0x0A, 0x06, // 54:160
0x00, 0xAA, 0x09, 0x06, // 55:170
0x00, 0xB3, 0x0A, 0x06, // 56:179
0x00, 0xBD, 0x0A, 0x06, // 57:189
0x00, 0xC7, 0x04, 0x03, // 58:199
0x00, 0xCB, 0x04, 0x03, // 59:203
0x00, 0xCF, 0x0A, 0x06, // 60:207
0x00, 0xD9, 0x09, 0x06, // 61:217
0x00, 0xE2, 0x09, 0x06, // 62:226
0x00, 0xEB, 0x0B, 0x06, // 63:235
0x00, 0xF6, 0x14, 0x0A, // 64:246
0x01, 0x0A, 0x0E, 0x07, // 65:266
0x01, 0x18, 0x0C, 0x07, // 66:280
0x01, 0x24, 0x0C, 0x07, // 67:292
0x01, 0x30, 0x0B, 0x07, // 68:304
0x01, 0x3B, 0x0C, 0x07, // 69:315
0x01, 0x47, 0x09, 0x06, // 70:327
0x01, 0x50, 0x0D, 0x08, // 71:336
0x01, 0x5D, 0x0C, 0x07, // 72:349
0x01, 0x69, 0x04, 0x03, // 73:361
0x01, 0x6D, 0x08, 0x05, // 74:365
0x01, 0x75, 0x0E, 0x07, // 75:373
0x01, 0x83, 0x0C, 0x06, // 76:387
0x01, 0x8F, 0x10, 0x08, // 77:399
0x01, 0x9F, 0x0C, 0x07, // 78:415
0x01, 0xAB, 0x0E, 0x08, // 79:427
0x01, 0xB9, 0x0B, 0x07, // 80:441
0x01, 0xC4, 0x0E, 0x08, // 81:452
0x01, 0xD2, 0x0C, 0x07, // 82:466
0x01, 0xDE, 0x0C, 0x07, // 83:478
0x01, 0xEA, 0x0B, 0x06, // 84:490
0x01, 0xF5, 0x0C, 0x07, // 85:501
0x02, 0x01, 0x0D, 0x07, // 86:513
0x02, 0x0E, 0x11, 0x09, // 87:526
0x02, 0x1F, 0x0E, 0x07, // 88:543
0x02, 0x2D, 0x0D, 0x07, // 89:557
0x02, 0x3A, 0x0C, 0x06, // 90:570
0x02, 0x46, 0x06, 0x03, // 91:582
0x02, 0x4C, 0x06, 0x03, // 92:588
0x02, 0x52, 0x04, 0x03, // 93:594
0x02, 0x56, 0x09, 0x05, // 94:598
0x02, 0x5F, 0x0C, 0x06, // 95:607
0x02, 0x6B, 0x03, 0x03, // 96:619
0x02, 0x6E, 0x0A, 0x06, // 97:622
0x02, 0x78, 0x0A, 0x06, // 98:632
0x02, 0x82, 0x0A, 0x05, // 99:642
0x02, 0x8C, 0x0A, 0x06, // 100:652
0x02, 0x96, 0x0A, 0x06, // 101:662
0x02, 0xA0, 0x05, 0x03, // 102:672
0x02, 0xA5, 0x0A, 0x06, // 103:677
0x02, 0xAF, 0x0A, 0x06, // 104:687
0x02, 0xB9, 0x04, 0x02, // 105:697
0x02, 0xBD, 0x04, 0x02, // 106:701
0x02, 0xC1, 0x08, 0x05, // 107:705
0x02, 0xC9, 0x04, 0x02, // 108:713
0x02, 0xCD, 0x10, 0x08, // 109:717
0x02, 0xDD, 0x0A, 0x06, // 110:733
0x02, 0xE7, 0x0A, 0x06, // 111:743
0x02, 0xF1, 0x0A, 0x06, // 112:753
0x02, 0xFB, 0x0A, 0x06, // 113:763
0x03, 0x05, 0x05, 0x03, // 114:773
0x03, 0x0A, 0x08, 0x05, // 115:778
0x03, 0x12, 0x06, 0x03, // 116:786
0x03, 0x18, 0x0A, 0x06, // 117:792
0x03, 0x22, 0x09, 0x05, // 118:802
0x03, 0x2B, 0x0E, 0x07, // 119:811
0x03, 0x39, 0x0A, 0x05, // 120:825
0x03, 0x43, 0x09, 0x05, // 121:835
0x03, 0x4C, 0x0A, 0x05, // 122:844
0x03, 0x56, 0x06, 0x03, // 123:854
0x03, 0x5C, 0x04, 0x03, // 124:860
0x03, 0x60, 0x05, 0x03, // 125:864
0x03, 0x65, 0x09, 0x06, // 126:869
0xFF, 0xFF, 0x00, 0x00, // 127:65535
0xFF, 0xFF, 0x00, 0x0A, // 128:65535
0xFF, 0xFF, 0x00, 0x0A, // 129:65535
0xFF, 0xFF, 0x00, 0x0A, // 130:65535
0xFF, 0xFF, 0x00, 0x0A, // 131:65535
0xFF, 0xFF, 0x00, 0x0A, // 132:65535
0xFF, 0xFF, 0x00, 0x0A, // 133:65535
0xFF, 0xFF, 0x00, 0x0A, // 134:65535
0xFF, 0xFF, 0x00, 0x0A, // 135:65535
0xFF, 0xFF, 0x00, 0x0A, // 136:65535
0xFF, 0xFF, 0x00, 0x0A, // 137:65535
0xFF, 0xFF, 0x00, 0x0A, // 138:65535
0xFF, 0xFF, 0x00, 0x0A, // 139:65535
0xFF, 0xFF, 0x00, 0x0A, // 140:65535
0xFF, 0xFF, 0x00, 0x0A, // 141:65535
0xFF, 0xFF, 0x00, 0x0A, // 142:65535
0xFF, 0xFF, 0x00, 0x0A, // 143:65535
0xFF, 0xFF, 0x00, 0x0A, // 144:65535
0xFF, 0xFF, 0x00, 0x0A, // 145:65535
0xFF, 0xFF, 0x00, 0x0A, // 146:65535
0xFF, 0xFF, 0x00, 0x0A, // 147:65535
0xFF, 0xFF, 0x00, 0x0A, // 148:65535
0xFF, 0xFF, 0x00, 0x0A, // 149:65535
0xFF, 0xFF, 0x00, 0x0A, // 150:65535
0xFF, 0xFF, 0x00, 0x0A, // 151:65535
0xFF, 0xFF, 0x00, 0x0A, // 152:65535
0xFF, 0xFF, 0x00, 0x0A, // 153:65535
0xFF, 0xFF, 0x00, 0x0A, // 154:65535
0xFF, 0xFF, 0x00, 0x0A, // 155:65535
0xFF, 0xFF, 0x00, 0x0A, // 156:65535
0xFF, 0xFF, 0x00, 0x0A, // 157:65535
0xFF, 0xFF, 0x00, 0x0A, // 158:65535
0xFF, 0xFF, 0x00, 0x0A, // 159:65535
0xFF, 0xFF, 0x00, 0x03, // 160:65535
0x03, 0x6E, 0x04, 0x03, // 161:878
0x03, 0x72, 0x0A, 0x06, // 162:882
0x03, 0x7C, 0x0C, 0x06, // 163:892
0x03, 0x88, 0x0A, 0x06, // 164:904
0x03, 0x92, 0x0A, 0x06, // 165:914
0x03, 0x9C, 0x04, 0x03, // 166:924
0x03, 0xA0, 0x0A, 0x06, // 167:928
0x03, 0xAA, 0x05, 0x03, // 168:938
0x03, 0xAF, 0x0D, 0x07, // 169:943
0x03, 0xBC, 0x07, 0x04, // 170:956
0x03, 0xC3, 0x0A, 0x06, // 171:963
0x03, 0xCD, 0x09, 0x06, // 172:973
0x03, 0xD6, 0x03, 0x03, // 173:982
0xFF, 0xFF, 0x0D, 0x07, // 174:985
0xFF, 0xFF, 0x0B, 0x06, // 175:998
0xFF, 0xFF, 0x07, 0x04, // 176:1009
0xFF, 0xFF, 0x0A, 0x05, // 177:1016
0xFF, 0xFF, 0x05, 0x03, // 178:1026
0xFF, 0xFF, 0x05, 0x03, // 179:1031
0xFF, 0xFF, 0x05, 0x03, // 180:1036
0xFF, 0xFF, 0x0A, 0x06, // 181:1041
0xFF, 0xFF, 0x09, 0x05, // 182:1051
0xFF, 0xFF, 0x03, 0x03, // 183:1060
0xFF, 0xFF, 0x06, 0x03, // 184:1063
0xFF, 0xFF, 0x05, 0x03, // 185:1069
0xFF, 0xFF, 0x07, 0x04, // 186:1074
0xFF, 0xFF, 0x0A, 0x06, // 187:1081
0xFF, 0xFF, 0x10, 0x08, // 188:1091
0xFF, 0xFF, 0x10, 0x08, // 189:1107
0xFF, 0xFF, 0x10, 0x08, // 190:1123
0xFF, 0xFF, 0x0A, 0x06, // 191:1139
0xFF, 0xFF, 0x0E, 0x07, // 192:1149
0xFF, 0xFF, 0x0E, 0x07, // 193:1163
0xFF, 0xFF, 0x0E, 0x07, // 194:1177
0xFF, 0xFF, 0x0E, 0x07, // 195:1191
0xFF, 0xFF, 0x0E, 0x07, // 196:1205
0xFF, 0xFF, 0x0E, 0x07, // 197:1219
0xFF, 0xFF, 0x12, 0x0A, // 198:1233
0xFF, 0xFF, 0x0C, 0x07, // 199:1251
0xFF, 0xFF, 0x0C, 0x07, // 200:1263
0xFF, 0xFF, 0x0C, 0x07, // 201:1275
0xFF, 0xFF, 0x0C, 0x07, // 202:1287
0xFF, 0xFF, 0x0C, 0x07, // 203:1299
0xFF, 0xFF, 0x05, 0x03, // 204:1311
0xFF, 0xFF, 0x04, 0x03, // 205:1316
0xFF, 0xFF, 0x04, 0x03, // 206:1320
0xFF, 0xFF, 0x05, 0x03, // 207:1324
0xFF, 0xFF, 0x0B, 0x07, // 208:1329
0xFF, 0xFF, 0x0C, 0x07, // 209:1340
0xFF, 0xFF, 0x0E, 0x08, // 210:1352
0xFF, 0xFF, 0x0E, 0x08, // 211:1366
0xFF, 0xFF, 0x0E, 0x08, // 212:1380
0xFF, 0xFF, 0x0E, 0x08, // 213:1394
0xFF, 0xFF, 0x0E, 0x08, // 214:1408
0xFF, 0xFF, 0x0A, 0x06, // 215:1422
0xFF, 0xFF, 0x0D, 0x08, // 216:1432
0xFF, 0xFF, 0x0C, 0x07, // 217:1445
0xFF, 0xFF, 0x0C, 0x07, // 218:1457
0xFF, 0xFF, 0x0C, 0x07, // 219:1469
0xFF, 0xFF, 0x0C, 0x07, // 220:1481
0xFF, 0xFF, 0x0D, 0x07, // 221:1493
0xFF, 0xFF, 0x0B, 0x07, // 222:1506
0xFF, 0xFF, 0x0C, 0x06, // 223:1517
0xFF, 0xFF, 0x0A, 0x06, // 224:1529
0xFF, 0xFF, 0x0A, 0x06, // 225:1539
0xFF, 0xFF, 0x0A, 0x06, // 226:1549
0xFF, 0xFF, 0x0A, 0x06, // 227:1559
0xFF, 0xFF, 0x0A, 0x06, // 228:1569
0xFF, 0xFF, 0x0A, 0x06, // 229:1579
0xFF, 0xFF, 0x10, 0x09, // 230:1589
0xFF, 0xFF, 0x0A, 0x05, // 231:1605
0xFF, 0xFF, 0x0A, 0x06, // 232:1615
0xFF, 0xFF, 0x0A, 0x06, // 233:1625
0xFF, 0xFF, 0x0A, 0x06, // 234:1635
0xFF, 0xFF, 0x0A, 0x06, // 235:1645
0xFF, 0xFF, 0x05, 0x03, // 236:1655
0xFF, 0xFF, 0x04, 0x03, // 237:1660
0xFF, 0xFF, 0x05, 0x03, // 238:1664
0xFF, 0xFF, 0x05, 0x03, // 239:1669
0xFF, 0xFF, 0x0A, 0x06, // 240:1674
0xFF, 0xFF, 0x0A, 0x06, // 241:1684
0xFF, 0xFF, 0x0A, 0x06, // 242:1694
0xFF, 0xFF, 0x0A, 0x06, // 243:1704
0xFF, 0xFF, 0x0A, 0x06, // 244:1714
0xFF, 0xFF, 0x0A, 0x06, // 245:1724
0xFF, 0xFF, 0x0A, 0x06, // 246:1734
0xFF, 0xFF, 0x09, 0x05, // 247:1744
0xFF, 0xFF, 0x0A, 0x06, // 248:1753
0xFF, 0xFF, 0x0A, 0x06, // 249:1763
0xFF, 0xFF, 0x0A, 0x06, // 250:1773
0xFF, 0xFF, 0x0A, 0x06, // 251:1783
0xFF, 0xFF, 0x0A, 0x06, // 252:1793
0xFF, 0xFF, 0x09, 0x05, // 253:1803
0xFF, 0xFF, 0x0A, 0x06, // 254:1812
0xFF, 0xFF, 0x09, 0x05, // 255:1822
// Font Data:
0x00, 0x00, 0x5f, 0x00, // 33
0x07, 0x00, 0x00, 0x00, 0x07, // 34
0x74, 0x00, 0x1c, 0x00, 0x77, 0x00, 0x1c, 0x00, 0x17, // 35
0x26, 0x00, 0x45, 0x00, 0xff, 0x00, 0x49, 0x00, 0x32, 0x00, // 36
0x00, 0x00, 0x06, 0x00, 0x09, 0x00, 0x66, 0x00, 0x18, 0x00, 0x36, 0x00, 0x49, 0x00, 0x30, 0x00, // 37
0x30, 0x00, 0x4a, 0x00, 0x4d, 0x00, 0x55, 0x00, 0x23, 0x00, 0x70, 0x00, 0x50, 0x00, // 38
0x07, // 39
0x7c, 0x00, 0x82, 0x00, 0x01, 0x01, // 40
0x01, 0x01, 0x82, 0x00, 0x7c, 0x00, // 41
0x05, 0x00, 0x03, 0x00, 0x05, // 42
0x08, 0x00, 0x08, 0x00, 0x3e, 0x00, 0x08, 0x00, 0x08, // 43
0x00, 0x00, 0xc0, 0x00, // 44
0x10, 0x00, 0x10, // 45
0x00, 0x00, 0x40, 0x00, // 46
0x60, 0x00, 0x1c, 0x00, 0x03, // 47
0x3e, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x00, 0x3e, 0x00, // 48
0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x7f, 0x00, // 49
0x42, 0x00, 0x61, 0x00, 0x51, 0x00, 0x49, 0x00, 0x46, 0x00, // 50
0x22, 0x00, 0x41, 0x00, 0x49, 0x00, 0x49, 0x00, 0x36, 0x00, // 51
0x18, 0x00, 0x14, 0x00, 0x12, 0x00, 0x11, 0x00, 0x7f, 0x00, 0x10, // 52
0x2c, 0x00, 0x47, 0x00, 0x45, 0x00, 0x45, 0x00, 0x39, 0x00, // 53
0x3e, 0x00, 0x45, 0x00, 0x45, 0x00, 0x45, 0x00, 0x3a, 0x00, // 54
0x01, 0x00, 0x61, 0x00, 0x19, 0x00, 0x07, 0x00, 0x01, // 55
0x36, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00, 0x36, 0x00, // 56
0x2e, 0x00, 0x51, 0x00, 0x51, 0x00, 0x51, 0x00, 0x3e, 0x00, // 57
0x00, 0x00, 0x44, 0x00, // 58
0x00, 0x00, 0xc4, 0x00, // 59
0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x14, 0x00, 0x22, 0x00, // 60
0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, // 61
0x00, 0x00, 0x22, 0x00, 0x14, 0x00, 0x14, 0x00, 0x08, // 62
0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x59, 0x00, 0x09, 0x00, 0x06, // 63
0x00, 0x00, 0x78, 0x00, 0x86, 0x00, 0x3a, 0x01, 0x45, 0x01, 0x45, 0x01, 0x79, 0x01, 0x4d, 0x01, 0xa2, 0x00, 0x9c, 0x00, // 64
0x40, 0x00, 0x38, 0x00, 0x16, 0x00, 0x11, 0x00, 0x16, 0x00, 0x38, 0x00, 0x40, 0x00, // 65
0x00, 0x00, 0x7f, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00, 0x3e, 0x00, // 66
0x00, 0x00, 0x3e, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x00, 0x22, 0x00, // 67
0x00, 0x00, 0x7f, 0x00, 0x41, 0x00, 0x41, 0x00, 0x22, 0x00, 0x1c, // 68
0x00, 0x00, 0x7f, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00, // 69
0x00, 0x00, 0x7f, 0x00, 0x09, 0x00, 0x09, 0x00, 0x01, // 70
0x00, 0x00, 0x1c, 0x00, 0x22, 0x00, 0x41, 0x00, 0x49, 0x00, 0x2a, 0x00, 0x18, // 71
0x00, 0x00, 0x7f, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x7f, 0x00, // 72
0x00, 0x00, 0x7f, 0x00, // 73
0x60, 0x00, 0x40, 0x00, 0x40, 0x00, 0x3f, 0x00, // 74
0x00, 0x00, 0x7f, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x12, 0x00, 0x21, 0x00, 0x40, 0x00, // 75
0x00, 0x00, 0x7f, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, // 76
0x00, 0x00, 0x7f, 0x00, 0x06, 0x00, 0x38, 0x00, 0x40, 0x00, 0x38, 0x00, 0x06, 0x00, 0x7f, 0x00, // 77
0x00, 0x00, 0x7f, 0x00, 0x06, 0x00, 0x08, 0x00, 0x30, 0x00, 0x7f, 0x00, // 78
0x00, 0x00, 0x3e, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x00, 0x3e, 0x00, // 79
0x00, 0x00, 0x7f, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x06, // 80
0x00, 0x00, 0x3e, 0x00, 0x41, 0x00, 0x41, 0x00, 0x61, 0x00, 0x61, 0x00, 0x5e, 0x00, // 81
0x00, 0x00, 0x7f, 0x00, 0x09, 0x00, 0x09, 0x00, 0x19, 0x00, 0x66, 0x00, // 82
0x00, 0x00, 0x26, 0x00, 0x49, 0x00, 0x49, 0x00, 0x49, 0x00, 0x32, 0x00, // 83
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x7f, 0x00, 0x01, 0x00, 0x01, // 84
0x00, 0x00, 0x3f, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x3f, 0x00, // 85
0x01, 0x00, 0x0e, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x0e, 0x00, 0x01, // 86
0x03, 0x00, 0x3c, 0x00, 0x40, 0x00, 0x3e, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x40, 0x00, 0x3c, 0x00, 0x03, // 87
0x40, 0x00, 0x21, 0x00, 0x12, 0x00, 0x0c, 0x00, 0x12, 0x00, 0x21, 0x00, 0x40, 0x00, // 88
0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x78, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, // 89
0x61, 0x00, 0x51, 0x00, 0x59, 0x00, 0x4d, 0x00, 0x47, 0x00, 0x43, 0x00, // 90
0x00, 0x00, 0xff, 0x01, 0x01, 0x01, // 91
0x03, 0x00, 0x1c, 0x00, 0x60, 0x00, // 92
0x01, 0x01, 0xff, 0x01, // 93
0x08, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, // 94
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // 95
0x01, 0x00, 0x02, // 96
0x00, 0x00, 0x60, 0x00, 0x54, 0x00, 0x54, 0x00, 0x7c, 0x00, // 97
0x00, 0x00, 0x7f, 0x00, 0x44, 0x00, 0x44, 0x00, 0x38, 0x00, // 98
0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x28, 0x00, // 99
0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x7f, 0x00, // 100
0x00, 0x00, 0x38, 0x00, 0x54, 0x00, 0x54, 0x00, 0x58, 0x00, // 101
0x04, 0x00, 0x7e, 0x00, 0x05, // 102
0x00, 0x00, 0xb8, 0x00, 0x44, 0x01, 0x44, 0x01, 0xfc, 0x00, // 103
0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x04, 0x00, 0x78, 0x00, // 104
0x00, 0x00, 0x7d, 0x00, // 105
0x00, 0x01, 0xfd, 0x00, // 106
0x7f, 0x00, 0x10, 0x00, 0x38, 0x00, 0x44, 0x00, // 107
0x00, 0x00, 0x7f, 0x00, // 108
0x00, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x04, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x04, 0x00, 0x78, 0x00, // 109
0x00, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x04, 0x00, 0x78, 0x00, // 110
0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x38, 0x00, // 111
0x00, 0x00, 0xfc, 0x01, 0x44, 0x00, 0x44, 0x00, 0x38, 0x00, // 112
0x00, 0x00, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0xfc, 0x01, // 113
0x00, 0x00, 0x7c, 0x00, 0x04, // 114
0x48, 0x00, 0x54, 0x00, 0x54, 0x00, 0x24, 0x00, // 115
0x04, 0x00, 0x7f, 0x00, 0x44, 0x00, // 116
0x00, 0x00, 0x3c, 0x00, 0x40, 0x00, 0x40, 0x00, 0x7c, 0x00, // 117
0x04, 0x00, 0x38, 0x00, 0x40, 0x00, 0x38, 0x00, 0x04, // 118
0x3c, 0x00, 0x40, 0x00, 0x38, 0x00, 0x04, 0x00, 0x38, 0x00, 0x40, 0x00, 0x3c, 0x00, // 119
0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, // 120
0x04, 0x00, 0x38, 0x01, 0xc0, 0x00, 0x38, 0x00, 0x04, // 121
0x44, 0x00, 0x64, 0x00, 0x54, 0x00, 0x4c, 0x00, 0x44, 0x00, // 122
0x10, 0x00, 0xef, 0x01, 0x01, 0x01, // 123
0x00, 0x00, 0xff, 0x01, // 124
0x01, 0x01, 0xef, 0x01, 0x10, // 125
0x18, 0x00, 0x08, 0x00, 0x18, 0x00, 0x10, 0x00, 0x18, // 126
0x00, 0x00, 0xf4, 0x01, // 161
0x00, 0x00, 0x38, 0x00, 0xf4, 0x01, 0x4f, 0x00, 0x28, 0x00, // 162
0x48, 0x00, 0x6e, 0x00, 0x59, 0x00, 0x49, 0x00, 0x41, 0x00, 0x42, 0x00, // 163
0x00, 0x00, 0x3c, 0x00, 0x24, 0x00, 0x24, 0x00, 0x3c, 0x00, // 164
0x29, 0x00, 0x2e, 0x00, 0x78, 0x00, 0x2e, 0x00, 0x29, 0x00, // 165
0x00, 0x00, 0xe7, 0x01, // 166
0x9a, 0x00, 0x25, 0x01, 0x29, 0x01, 0x49, 0x01, 0xb2, 0x00, // 167
0x01, 0x00, 0x00, 0x00, 0x01, // 168
0x1c, 0x00, 0x22, 0x00, 0x49, 0x00, 0x55, 0x00, 0x55, 0x00, 0x22, 0x00, 0x1c, // 169
0x0d, 0x00, 0x0d, 0x00, 0x0d, 0x00, 0x0f, // 170
0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x00, 0x48, 0x00, // 171
0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x1c, // 172
0x10, 0x00, 0x10// 173
}; |
@b73f9 interesting observation. Any chance you can locate the potential issue in the tool's code at https://github.com/squix78/esp8266-oled-ssd1306-font-converter? |
Hm, sorry, don't have an easy way to run that / experiment with it. |
I've already made a post here https://forum.arduino.cc/t/ssd1306wire-font-alignment-problem/978025
I then realized I can post an issue here on GitHub.
Library version 4.3.0. Arduino 1.8.13. macOS 12.2 (21D49). Generic ESP8266.
The drawString() seem unable to draw text at the first pixel rows of the display. I have a thermometer project where I want to maximize two temperature readings on a 128x64 display - I have experimented with creating a large font and is currently using a 34 pixel version of Sans Serif which looks nice on the pixels I've been able to utilize, however, there is some space left unused.
A call to drawstring(0,0...) leaves several pixels (the more the larger the font size used) unused at the top of the display. Using a smaller font moves text upwards
Here below two examples giving a hands on view of the problem.
display.setFont(ArialMT_Plain_10);
display.drawString(95,0, "toprow");
display.drawLine(0,0,128,0);
display.setFont(SansSerif_Plain_34);
display.drawString(0, 0, "12.3°");
display.drawString(0, 32, "12.3°");
display.drawRect(0,0,128,64);
The text was updated successfully, but these errors were encountered: