fix: render U+FFFD replacement character instead of ? (#366)
The current behavior of rendering `?` for an unknown Unicode character can be hard to distinguish from a typo. Use the standard Unicode "replacement character" instead, that's what it's designed for: https://en.wikipedia.org/wiki/Specials_(Unicode_block) I'm making this PR as a draft because I'm not sure I did everything that was needed to change the character set covered by the fonts. Running that script is in its own commit. If this is proper, I'll rebase/squash into one commit and un-draft. Co-authored-by: Maeve Andrews <maeve@git.mail.maeveandrews.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
#include "EpdFontData.h"
|
||||
|
||||
static const uint8_t notosans_12_italicBitmaps[48397] = {
|
||||
static const uint8_t notosans_12_italicBitmaps[48530] = {
|
||||
0x00, 0xB8, 0x03, 0xE0, 0x0F, 0x40, 0x7C, 0x02, 0xF0, 0x0F, 0x80, 0x3D, 0x00, 0xF0, 0x07, 0xC0,
|
||||
0x1E, 0x00, 0xB4, 0x03, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x40, 0x7E, 0x01, 0xF4, 0x01,
|
||||
0x00, 0x00, 0x1E, 0x0F, 0x0B, 0x87, 0xC2, 0xD1, 0xE0, 0xF0, 0xB4, 0x38, 0x2C, 0x0D, 0x0E, 0x02,
|
||||
@@ -3032,7 +3032,16 @@ static const uint8_t notosans_12_italicBitmaps[48397] = {
|
||||
0x0F, 0x00, 0x2E, 0x07, 0xC0, 0x0B, 0x82, 0xE0, 0x07, 0xC0, 0xF9, 0x5B, 0xD0, 0x3F, 0xFF, 0x80,
|
||||
0x0F, 0xAB, 0xF4, 0x07, 0xC0, 0x1F, 0x02, 0xE0, 0x03, 0xD0, 0xF4, 0x00, 0xF8, 0x3C, 0x00, 0x3D,
|
||||
0x0F, 0x00, 0x1F, 0x07, 0xC0, 0x1F, 0x82, 0xFF, 0xFF, 0x80, 0xFF, 0xFE, 0x40, 0x03, 0x8B, 0x00,
|
||||
0x00, 0xD3, 0x80, 0x00, 0x10, 0x40, 0x00, 0x2A, 0xA8, 0xFF, 0xE1, 0x55, 0x00,
|
||||
0x00, 0xD3, 0x80, 0x00, 0x10, 0x40, 0x00, 0x2A, 0xA8, 0xFF, 0xE1, 0x55, 0x00, 0x00, 0x00, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x2F, 0x00, 0x00,
|
||||
0x03, 0xE0, 0x00, 0x2F, 0x00, 0x00, 0x3F, 0xC6, 0xD0, 0x7F, 0x00, 0x03, 0xFF, 0xFF, 0xC1, 0xFF,
|
||||
0x00, 0x3F, 0xFF, 0xFE, 0x07, 0xFF, 0x03, 0xFF, 0xFF, 0xE0, 0x3F, 0xFF, 0x2F, 0xFF, 0xFE, 0x03,
|
||||
0xFF, 0xFE, 0x3F, 0xFF, 0xF0, 0x3F, 0xFF, 0xF0, 0x3F, 0xFF, 0x82, 0xFF, 0xFF, 0x00, 0x3F, 0xFF,
|
||||
0x5F, 0xFF, 0xF0, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xF5, 0xFF, 0xF0, 0x00, 0x00,
|
||||
0x3F, 0x41, 0xFF, 0x00, 0x00, 0x00, 0x3D, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x3E, 0xBF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
|
||||
0x00, 0x00,
|
||||
};
|
||||
|
||||
static const EpdGlyph notosans_12_italicGlyphs[] = {
|
||||
@@ -3869,6 +3878,7 @@ static const EpdGlyph notosans_12_italicGlyphs[] = {
|
||||
{ 17, 21, 15, -1, 21, 90, 48223 }, // ₾
|
||||
{ 13, 24, 14, 1, 21, 78, 48313 }, // ₿
|
||||
{ 7, 3, 8, 0, 8, 6, 48391 }, // −
|
||||
{ 23, 23, 25, 1, 19, 133, 48397 }, // <20>
|
||||
};
|
||||
|
||||
static const EpdUnicodeInterval notosans_12_italicIntervals[] = {
|
||||
@@ -3883,13 +3893,14 @@ static const EpdUnicodeInterval notosans_12_italicIntervals[] = {
|
||||
{ 0x2066, 0x206F, 0x316 },
|
||||
{ 0x20A0, 0x20BF, 0x320 },
|
||||
{ 0x2212, 0x2212, 0x340 },
|
||||
{ 0xFFFD, 0xFFFD, 0x341 },
|
||||
};
|
||||
|
||||
static const EpdFontData notosans_12_italic = {
|
||||
notosans_12_italicBitmaps,
|
||||
notosans_12_italicGlyphs,
|
||||
notosans_12_italicIntervals,
|
||||
11,
|
||||
12,
|
||||
34,
|
||||
27,
|
||||
-8,
|
||||
|
||||
Reference in New Issue
Block a user