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_8_regularBitmaps[10949] = {
|
||||
static const uint8_t notosans_8_regularBitmaps[10981] = {
|
||||
0xDB, 0x6D, 0xB6, 0xC3, 0xF4, 0xDE, 0xF7, 0xBD, 0x80, 0x0D, 0x83, 0x30, 0x66, 0x3F, 0xF7, 0xFE,
|
||||
0x36, 0x04, 0xC7, 0xFE, 0xFF, 0xC6, 0x40, 0xD8, 0x1B, 0x00, 0x18, 0x18, 0xFE, 0xFE, 0xD8, 0xF8,
|
||||
0xFC, 0x3E, 0x1F, 0x1B, 0xFF, 0xFE, 0x38, 0x18, 0x00, 0x01, 0xE1, 0x86, 0xCC, 0x13, 0x30, 0xCD,
|
||||
@@ -692,7 +692,9 @@ static const uint8_t notosans_8_regularBitmaps[10949] = {
|
||||
0x07, 0x01, 0xC0, 0x1B, 0x03, 0xE1, 0xFF, 0x3D, 0xED, 0xBF, 0xB6, 0xF6, 0xDE, 0x53, 0xC0, 0x1C,
|
||||
0x01, 0x80, 0x3F, 0xE7, 0xFC, 0x3C, 0x3C, 0xFE, 0xFF, 0xE3, 0xE3, 0xE7, 0xFE, 0xFF, 0xE3, 0xE3,
|
||||
0xE3, 0xFF, 0xFE, 0x3C, 0x3C, 0x00, 0x3F, 0x7E, 0x60, 0x60, 0xE0, 0xE0, 0x60, 0x7E, 0x3F, 0x0C,
|
||||
0x7F, 0x7E, 0x7F, 0xFF, 0xC0,
|
||||
0x7F, 0x7E, 0x7F, 0xFF, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x03, 0xE0, 0x07, 0xF0, 0x0C, 0x38, 0x1F,
|
||||
0xDC, 0x3F, 0xDE, 0x7F, 0xBF, 0x7F, 0x7F, 0x3F, 0x7E, 0x1F, 0xFC, 0x0F, 0xF8, 0x06, 0x70, 0x03,
|
||||
0xE0, 0x01, 0xC0, 0x00, 0x80,
|
||||
};
|
||||
|
||||
static const EpdGlyph notosans_8_regularGlyphs[] = {
|
||||
@@ -1530,6 +1532,7 @@ static const EpdGlyph notosans_8_regularGlyphs[] = {
|
||||
{ 8, 16, 10, 1, 14, 16, 10917 }, // ₿
|
||||
{ 8, 13, 8, 0, 10, 13, 10933 }, // ⃀
|
||||
{ 9, 2, 10, 0, 7, 3, 10946 }, // −
|
||||
{ 16, 16, 17, 0, 13, 32, 10949 }, // <20>
|
||||
};
|
||||
|
||||
static const EpdUnicodeInterval notosans_8_regularIntervals[] = {
|
||||
@@ -1544,13 +1547,14 @@ static const EpdUnicodeInterval notosans_8_regularIntervals[] = {
|
||||
{ 0x2066, 0x206F, 0x316 },
|
||||
{ 0x20A0, 0x20C0, 0x320 },
|
||||
{ 0x2212, 0x2212, 0x341 },
|
||||
{ 0xFFFD, 0xFFFD, 0x342 },
|
||||
};
|
||||
|
||||
static const EpdFontData notosans_8_regular = {
|
||||
notosans_8_regularBitmaps,
|
||||
notosans_8_regularGlyphs,
|
||||
notosans_8_regularIntervals,
|
||||
11,
|
||||
12,
|
||||
23,
|
||||
18,
|
||||
-5,
|
||||
|
||||
Reference in New Issue
Block a user