profont
profont copied to clipboard
Some specials characters are missing
Hi, I really like this font for my OLED screen. I need to display a price in EURO €. This symbol is missing for every size. Is it possible to have it ?
Thanks in advance
If the fonts I use as input to this project have a Euro glyph, then it should be possible. If you wanted to try doing it yourself you could add it to:
https://github.com/wezm/profont/blob/e2002b24ecba9658bb46cb5fef50e7e7abb41c14/tools/src/generate.rs#L81
and:
https://github.com/wezm/profont/blob/e2002b24ecba9658bb46cb5fef50e7e7abb41c14/font/src/lib.rs#L51
Hi @axoulc I looked into this and unfortunately the source font I'm currently using does not have a Euro glyph. Also checked the alternate OpenType Bitmap version of ProFont on https://tobiasjung.name/profont/ but it does not have it either. Since this crate is just transforming the font into a form usable with embedded-graphics, adding new glyphs to the source font is currently out of scope of the project.
For reference these are the glyphs it does have:
cmap sub-table encoding: Unicode
'␀' U+0000 -> 0
'␁' U+0001 -> 1
'␂' U+0002 -> 2
'␃' U+0003 -> 3
'␄' U+0004 -> 4
'␅' U+0005 -> 5
'␆' U+0006 -> 6
'␇' U+0007 -> 7
'␈' U+0008 -> 8
'␉' U+0009 -> 9
'␊' U+000A -> 10
'␋' U+000B -> 11
'␌' U+000C -> 12
'␍' U+000D -> 13
'␎' U+000E -> 14
'␏' U+000F -> 15
'␐' U+0010 -> 16
'␑' U+0011 -> 17
'␒' U+0012 -> 18
'␓' U+0013 -> 19
'␔' U+0014 -> 20
'␕' U+0015 -> 21
'␖' U+0016 -> 22
'␗' U+0017 -> 23
'␘' U+0018 -> 24
'␙' U+0019 -> 25
'␚' U+001A -> 26
'␛' U+001B -> 27
'␜' U+001C -> 28
'␝' U+001D -> 29
'␞' U+001E -> 30
'␟' U+001F -> 31
' ' U+0020 -> 32
'!' U+0021 -> 33
'"' U+0022 -> 34
'#' U+0023 -> 35
'$' U+0024 -> 36
'%' U+0025 -> 37
'&' U+0026 -> 38
''' U+0027 -> 39
'(' U+0028 -> 40
')' U+0029 -> 41
'*' U+002A -> 42
'+' U+002B -> 43
',' U+002C -> 44
'-' U+002D -> 45
'.' U+002E -> 46
'/' U+002F -> 47
'0' U+0030 -> 48
'1' U+0031 -> 49
'2' U+0032 -> 50
'3' U+0033 -> 51
'4' U+0034 -> 52
'5' U+0035 -> 53
'6' U+0036 -> 54
'7' U+0037 -> 55
'8' U+0038 -> 56
'9' U+0039 -> 57
':' U+003A -> 58
';' U+003B -> 59
'<' U+003C -> 60
'=' U+003D -> 61
'>' U+003E -> 62
'?' U+003F -> 63
'@' U+0040 -> 64
'A' U+0041 -> 65
'B' U+0042 -> 66
'C' U+0043 -> 67
'D' U+0044 -> 68
'E' U+0045 -> 69
'F' U+0046 -> 70
'G' U+0047 -> 71
'H' U+0048 -> 72
'I' U+0049 -> 73
'J' U+004A -> 74
'K' U+004B -> 75
'L' U+004C -> 76
'M' U+004D -> 77
'N' U+004E -> 78
'O' U+004F -> 79
'P' U+0050 -> 80
'Q' U+0051 -> 81
'R' U+0052 -> 82
'S' U+0053 -> 83
'T' U+0054 -> 84
'U' U+0055 -> 85
'V' U+0056 -> 86
'W' U+0057 -> 87
'X' U+0058 -> 88
'Y' U+0059 -> 89
'Z' U+005A -> 90
'[' U+005B -> 91
'\' U+005C -> 92
']' U+005D -> 93
'^' U+005E -> 94
'_' U+005F -> 95
'`' U+0060 -> 96
'a' U+0061 -> 97
'b' U+0062 -> 98
'c' U+0063 -> 99
'd' U+0064 -> 100
'e' U+0065 -> 101
'f' U+0066 -> 102
'g' U+0067 -> 103
'h' U+0068 -> 104
'i' U+0069 -> 105
'j' U+006A -> 106
'k' U+006B -> 107
'l' U+006C -> 108
'm' U+006D -> 109
'n' U+006E -> 110
'o' U+006F -> 111
'p' U+0070 -> 112
'q' U+0071 -> 113
'r' U+0072 -> 114
's' U+0073 -> 115
't' U+0074 -> 116
'u' U+0075 -> 117
'v' U+0076 -> 118
'w' U+0077 -> 119
'x' U+0078 -> 120
'y' U+0079 -> 121
'z' U+007A -> 122
'{' U+007B -> 123
'|' U+007C -> 124
'}' U+007D -> 125
'~' U+007E -> 126
'⑿' U+007F -> 127
U+0080 -> 128
U+0081 -> 129
U+0082 -> 130
U+0083 -> 131
U+0084 -> 132
U+0085 -> 133
U+0086 -> 134
U+0087 -> 135
U+0088 -> 136
U+0089 -> 137
U+008A -> 138
U+008B -> 139
U+008C -> 140
U+008D -> 141
U+008E -> 142
U+008F -> 143
U+0090 -> 144
U+0091 -> 145
U+0092 -> 146
U+0093 -> 147
U+0094 -> 148
U+0095 -> 149
U+0096 -> 150
U+0097 -> 151
U+0098 -> 152
U+0099 -> 153
U+009A -> 154
U+009B -> 155
U+009C -> 156
U+009D -> 157
U+009E -> 158
U+009F -> 159
' ' U+00A0 -> 160
'¡' U+00A1 -> 161
'¢' U+00A2 -> 162
'£' U+00A3 -> 163
'¤' U+00A4 -> 164
'¥' U+00A5 -> 165
'¦' U+00A6 -> 166
'§' U+00A7 -> 167
'¨' U+00A8 -> 168
'©' U+00A9 -> 169
'ª' U+00AA -> 170
'«' U+00AB -> 171
'¬' U+00AC -> 172
'' U+00AD -> 173
'®' U+00AE -> 174
'¯' U+00AF -> 175
'°' U+00B0 -> 176
'±' U+00B1 -> 177
'²' U+00B2 -> 178
'³' U+00B3 -> 179
'´' U+00B4 -> 180
'µ' U+00B5 -> 181
'¶' U+00B6 -> 182
'·' U+00B7 -> 183
'¸' U+00B8 -> 184
'¹' U+00B9 -> 185
'º' U+00BA -> 186
'»' U+00BB -> 187
'¼' U+00BC -> 188
'½' U+00BD -> 189
'¾' U+00BE -> 190
'¿' U+00BF -> 191
'À' U+00C0 -> 192
'Á' U+00C1 -> 193
'Â' U+00C2 -> 194
'Ã' U+00C3 -> 195
'Ä' U+00C4 -> 196
'Å' U+00C5 -> 197
'Æ' U+00C6 -> 198
'Ç' U+00C7 -> 199
'È' U+00C8 -> 200
'É' U+00C9 -> 201
'Ê' U+00CA -> 202
'Ë' U+00CB -> 203
'Ì' U+00CC -> 204
'Í' U+00CD -> 205
'Î' U+00CE -> 206
'Ï' U+00CF -> 207
'Ð' U+00D0 -> 208
'Ñ' U+00D1 -> 209
'Ò' U+00D2 -> 210
'Ó' U+00D3 -> 211
'Ô' U+00D4 -> 212
'Õ' U+00D5 -> 213
'Ö' U+00D6 -> 214
'×' U+00D7 -> 215
'Ø' U+00D8 -> 216
'Ù' U+00D9 -> 217
'Ú' U+00DA -> 218
'Û' U+00DB -> 219
'Ü' U+00DC -> 220
'Ý' U+00DD -> 221
'Þ' U+00DE -> 222
'ß' U+00DF -> 223
'à' U+00E0 -> 224
'á' U+00E1 -> 225
'â' U+00E2 -> 226
'ã' U+00E3 -> 227
'ä' U+00E4 -> 228
'å' U+00E5 -> 229
'æ' U+00E6 -> 230
'ç' U+00E7 -> 231
'è' U+00E8 -> 232
'é' U+00E9 -> 233
'ê' U+00EA -> 234
'ë' U+00EB -> 235
'ì' U+00EC -> 236
'í' U+00ED -> 237
'î' U+00EE -> 238
'ï' U+00EF -> 239
'ð' U+00F0 -> 240
'ñ' U+00F1 -> 241
'ò' U+00F2 -> 242
'ó' U+00F3 -> 243
'ô' U+00F4 -> 244
'õ' U+00F5 -> 245
'ö' U+00F6 -> 246
'÷' U+00F7 -> 247
'ø' U+00F8 -> 248
'ù' U+00F9 -> 249
'ú' U+00FA -> 250
'û' U+00FB -> 251
'ü' U+00FC -> 252
'ý' U+00FD -> 253
'þ' U+00FE -> 254
'ÿ' U+00FF -> 255
'' U+FFFF -> 0
Looking over the ProFont website some more there is a version "ProFont bitmap with €" for Macintosh. This is a classic Mac font suitcase stored in a resource fork. Using my MacBinary decoder I see the following:
Poking around in ResEdit I have confirmed € is present:
So it's possible this crate could be rebuilt to use this font, or at least retrieve the € from it. This is a fairly large amount of work though, and I'm not sure if/when I'll be able to get to it.
This is a fairly large amount of work though, and I'm not sure if/when I'll be able to get to it.
Ok, I nerd sniped my way into doing this, I'm about 80% done.
@wezm I didn't expect so much from you. Thanks in advance
@wezm if I can help you for anything, just let me know ! ;)
All good so far, just working out some glyph positioning issues. Here's the WIP font atlas for 24pt (note € in the middle of the last line):