Changeset 272379 in webkit
- Timestamp:
- Feb 4, 2021 1:28:25 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r272375 r272379 1 2021-02-04 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Supplementary code points (U+10000 - U+10FFFF) are not shaped correctly in the fast text codepath 4 https://bugs.webkit.org/show_bug.cgi?id=221356 5 <rdar://problem/72555297> 6 7 Reviewed by Zalan Bujtas. 8 9 * fast/text/multi-code-unit-simple-path-expected-mismatch.html: Added. 10 * fast/text/multi-code-unit-simple-path.html: Added. 11 1 12 2021-02-04 Devin Rousso <drousso@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r272377 r272379 1 2021-02-04 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Supplementary code points (U+10000 - U+10FFFF) are not shaped correctly in the fast text codepath 4 https://bugs.webkit.org/show_bug.cgi?id=221356 5 <rdar://problem/72555297> 6 7 Reviewed by Zalan Bujtas. 8 9 Supplementary code points are represented in UTF-16 as two adjacent (surrogate) code units. When we map code 10 points to glyphs, we were originally mapping these two code units to a single glyph. However, shaping 11 routines require that the number of code units and glyphs be equal, by injecting a 0 glyph for the trailing 12 surrogate. 13 14 Luckily, we don't actually have to delete these extra 0 glyphs, because the shaping engine will do that for us. 15 16 Test: fast/text/multi-code-unit-simple-path.html 17 18 * platform/graphics/WidthIterator.cpp: 19 (WebCore::WidthIterator::advanceInternal): 20 1 21 2021-02-04 Megan Gardner <megan_gardner@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/WidthIterator.cpp
r266688 r272379 263 263 264 264 glyphBuffer.add(glyph, *font, width, currentCharacterIndex); 265 #if !PLATFORM(COCOA) || USE(CTFONTSHAPEGLYPHS) 266 // These 0 glyphs are needed by shapers if the source text has surrogate pairs. 267 // However, CTFontTransformGlyphs() can't delete these 0 glyphs from the shaped text, 268 // so we shouldn't add them in the first place if we're using that shaping routine. 269 // Any other shaping routine should delete these glyphs from the shaped text. 270 if (!U_IS_BMP(character)) 271 glyphBuffer.add(0, *font, 0, currentCharacterIndex + 1); 272 #endif 265 273 266 274 // Advance past the character we just dealt with.
Note: See TracChangeset
for help on using the changeset viewer.