[HarfBuzz] Trouble with clusters and accented latin characters
Lóránt Pintér
lorant.pinter at prezi.com
Sun Oct 14 10:31:10 PDT 2012
Hi,
I'm trying to shape the word "tér" with HarfBuzz, and this is what I get back:
hb_buffer_get_glyph_infos() after calling hb_buffer_add_utf8():
Char #0: { codepoint: 116, mask: 1, cluster: 0, var1: 0, var2: 0 }
Char #1: { codepoint: 233, mask: 1, cluster: 1, var1: 0, var2: 0 }
Char #2: { codepoint: 114, mask: 1, cluster: 3, var1: 0, var2: 0 }
…and after calling hb_shape():
Glyph #0: { codepoint: 86, mask: 1, cluster: 0, var1: 2, var2: 5 }
Glyph #1: { codepoint: 156, mask: 1, cluster: 1, var1: 2, var2: 5 }
Glyph #2: { codepoint: 84, mask: 1, cluster: 3, var1: 2, var2: 5 }
I believed up to now that each cluster corresponded to a character in the original string. Why is the letter "é" turned into two clusters here?
--
Lóci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20121014/ce970ea1/attachment.html>
More information about the HarfBuzz
mailing list