mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 909344 - render stray control characters as hexboxes instead of invisible. r=roc
This commit is contained in:
parent
f477146890
commit
45314d379f
@ -3344,11 +3344,14 @@ gfxFont::ShapeTextWithoutWordCache(gfxContext *aContext,
|
||||
}
|
||||
|
||||
// fragment was terminated by an invalid char: skip it,
|
||||
// unless it's a control char that we want to show as a hexbox,
|
||||
// but record where TAB or NEWLINE occur
|
||||
if (ch == '\t') {
|
||||
aTextRun->SetIsTab(aOffset + i);
|
||||
} else if (ch == '\n') {
|
||||
aTextRun->SetIsNewline(aOffset + i);
|
||||
} else if ((ch & 0x7f) < 0x20 || ch == 0x7f) {
|
||||
aTextRun->SetMissingGlyph(aOffset + i, ch, this);
|
||||
}
|
||||
fragStart = i + 1;
|
||||
}
|
||||
@ -3485,11 +3488,14 @@ gfxFont::SplitAndInitTextRun(gfxContext *aContext,
|
||||
"how did we get here except via an invalid char?");
|
||||
|
||||
// word was terminated by an invalid char: skip it,
|
||||
// unless it's a control char that we want to show as a hexbox,
|
||||
// but record where TAB or NEWLINE occur
|
||||
if (ch == '\t') {
|
||||
aTextRun->SetIsTab(aRunStart + i);
|
||||
} else if (ch == '\n') {
|
||||
aTextRun->SetIsNewline(aRunStart + i);
|
||||
} else if ((ch & 0x7f) < 0x20 || ch == 0x7f) {
|
||||
aTextRun->SetMissingGlyph(aRunStart + i, ch, this);
|
||||
}
|
||||
|
||||
hash = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user