Summary: | Characters with no fonts that support them are drawn as two .notdef glyphs in the fast text codepath | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||||
Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | dino, jonlee, simon.fraser, thorton, webkit-bug-importer, zalan | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Myles C. Maxfield
2021-07-19 19:19:20 PDT
Created attachment 433844 [details]
Patch
Comment on attachment 433844 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433844&action=review > Source/WebCore/platform/graphics/WidthIterator.cpp:274 > + if (!U_IS_BMP(character) && glyph) I'm not sure this is correct. Shaping expects the number of glyphs to equal the length of the string. Created attachment 433847 [details]
Patch
Created attachment 433848 [details]
Patch
Comment on attachment 433848 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433848&action=review > Source/WebCore/ChangeLog:3 > + Characters with no fonts that support them are drawn as two .notdef glyphs in the fast text codepath REGRESSION(r272379): > LayoutTests/ChangeLog:3 > + Characters with no fonts that support them are drawn as two .notdef glyphs in the fast text codepath REGRESSION(r272379): Created attachment 433849 [details]
Patch
Comment on attachment 433849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433849&action=review > Source/WebCore/platform/graphics/WidthIterator.cpp:115 > + if (!glyphBuffer.glyphAt(i) && !glyphBuffer.glyphAt(i + 1)) { I assume these surrogates come in pairs and the i + 1 derefs are safe. Comment on attachment 433849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433849&action=review > Source/WebCore/platform/graphics/WidthIterator.cpp:121 > + continue; This continue does nothing. Committed r280103 (239820@main): <https://commits.webkit.org/239820@main> Comment on attachment 433849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433849&action=review >> Source/WebCore/platform/graphics/WidthIterator.cpp:115 >> + if (!glyphBuffer.glyphAt(i) && !glyphBuffer.glyphAt(i + 1)) { > > I assume these surrogates come in pairs and the i + 1 derefs are safe. The for loop has "i < glyphBuffer.size() - 1" They're not guaranteed to come in pairs, but when they do, that's the case where we get the double .notdef glyphs. If they don't come in pairs, we don't need to strip them out. *** Bug 223308 has been marked as a duplicate of this bug. *** |