Bug 664125 - Zero-width spaces cause missing characters
authorKristian Rietveld <kris@lanedo.com>
Sat, 26 Nov 2011 16:27:43 +0000 (17:27 +0100)
committerKristian Rietveld <kris@lanedo.com>
Thu, 19 Jan 2012 16:20:23 +0000 (17:20 +0100)
commitdbf40154eb5804f4e8c582f12b30b8291c9c3532
treedc072c5f950edc9801f177cdd9ec7745ce2683fa
parent92c58b4372833db6974da73b75d457177f402bb6
Bug 664125 - Zero-width spaces cause missing characters

This is fixed by using the characters obtained from CoreText's mapping from
glyphs back to the original string instead of blindly iterating over the
original gchar string. Take notice that we have to convert these indices
from the mapping back to a byte index in the original UTF8 string.

Zero-width spaces are already removed from the list of CGGlyphs, so we were
mismatching CGGlyphs and characters from the original string. Using
CoreText's list of string indices instead eliminates the mismatches.
modules/basic/basic-coretext.c