Bug 179099
| Summary: | Cannot map from glyphs back to character indices when using | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> |
| Component: | Text | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED MOVED | ||
| Severity: | Normal | CC: | bfulgham, mmaxfield, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Myles C. Maxfield
In both of our text codepaths, we build up parallel arrays of glyph IDs, paint advances, and string indices (the character which originated the glyph).
In Cocoa's complex text codepath, these come from CTRunGetGlyphs(), CTRunGetAdvances(), and CTRunGetStringIndices(), respectively.
In our simple text codepath, we first build up initial versions of the arrays by looping through the string, and using CTFontGetGlyphsForCharacters(), CTFontGetAdvancesForGlyphs(), and the loop index variable. Then we call Font::applyTransforms() (which, in Cocoa, calls CTFontTransformGlyphs()) which modifies the glyph and advances arrays. However, we don't make similar modifications to the array of string indices.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/35285887>
Myles C. Maxfield
I should also note that this array of string indices is not always present, because we don't always need it. It's optional.
Brent Fulgham
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.
The relevant team believes that this behaves correctly.