Add U+FFFD replacement character and use instead of ?

This commit is contained in:
Maeve Andrews
2026-01-13 23:35:51 -06:00
parent 21277e03eb
commit ea7ed3e572
37 changed files with 620 additions and 100 deletions

View File

@@ -582,7 +582,7 @@ void GfxRenderer::drawTextRotated90CW(const int fontId, const int x, const int y
while ((cp = utf8NextCodepoint(reinterpret_cast<const uint8_t**>(&text)))) {
const EpdGlyph* glyph = font.getGlyph(cp, style);
if (!glyph) {
glyph = font.getGlyph('?', style);
glyph = font.getGlyph(REPLACEMENT_GLYPH, style);
}
if (!glyph) {
continue;
@@ -760,8 +760,7 @@ void GfxRenderer::renderChar(const EpdFontFamily& fontFamily, const uint32_t cp,
const bool pixelState, const EpdFontFamily::Style style) const {
const EpdGlyph* glyph = fontFamily.getGlyph(cp, style);
if (!glyph) {
// TODO: Replace with fallback glyph property?
glyph = fontFamily.getGlyph('?', style);
glyph = fontFamily.getGlyph(REPLACEMENT_GLYPH, style);
}
// no glyph?