Created attachment 245837 [details] Reproduction screenshot https://www.opengl.org/wiki/Geometry_Shader Double click on "triangle_strip" (see screenshot) Version 8.0.3 (10600.3.18, r179440) 14C109
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.