| Summary: | ComplexTextController::offsetForPosition() might erroneously detect a ligature when instead CT simply omitted an invisible glyph | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||
| Component: | Layout and Rendering | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | ||||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Myles C. Maxfield
2015-02-01 11:46:07 PST
Created attachment 260046 [details]
Reduction
Not due to simple line layout For some reason the ZWS is being layed out to be the right half of the "p" offsetForPosition() uses the complex text code path. In this code path, when the string ends with a ZWS, CoreText simply doesn't return a glyph for that character. However, this means that in ComplexTextController::offsetForPosition(), it appears that the last glyph corresponds with two characters (since that ZWS doesn't get its own glyph). This makes us think that we are encountering a ligature, and we put the break between the two code points in the middle of the last glyph. When you double click, you select the word, without the ZWS. Therefore, the caret gets placed in the middle of the last glyph. |