Hi, On Mon, 3 Sep 2007 13:23:40 +0200 <[EMAIL PROTECTED]> wrote: >Hi, >is freetype capable of dealing with the unicode normalization forms? >I've tried to render these two examples glyph by glyph in order to >get the desired result: > >Syntax: desired_result = first_glyph_rendered + second_glyph_rendered + ... > >0x00E4 = 0x0061 + 0x0308
>The first one worked just fine. You wrote the 1st case works well, but I suppose it's dependent with font. The font you used for testing may provide non-spacing character @ U+0308, so rendering text U+0061 + U+0308 makes U+0308 glyph overstriking on the top of U+0061. But it is possible to implement a font which assigns spacing character (with dotted- circle) @ U+0308. Such kind of font is also permitted. >0x01DE = 0x0041 + 0x0308 + 0x0304 >But in the second one both combining >characters (308+304) had been placed at the same >position instead of on top of each other. So is >there actually a reliable way to render normalized >unicode characters composed of more then one combining >character with freetype? I suppose you found a simply overstriken junk of 3 glyphs, because U+0308 & U+0304 are not tuned their positions. Today, it is classified as legacy and deprecated way for TrueType font to display an accented Latin character by overstriking of base Latin alphabets and diacritical marks. The recommended way is using an intelligent font formats like OpenType or TrueType GX. In these font formats, various precomposed glyph (e.g. 0x00E4, 0x01DE etc etc) are included, even if they are not coded in Unicode. In addition, the ruleset to compute precomposed glyph index from a serie of "component" glyph index is also included in the font. The OpenType or TrueType GX renderer compute an index of precomposed glyph (e.g. glyph index for U+01DE) from given serie of component glyphs (e.g. 3 glyph index for U+0041, U+0308, U+0304), and display the precomposed glyph at once. It does not overstrike 3 component characters on graphic device. FreeType supports it? No. At least, FreeType2 does not support OpenType layout system (you have to compute the glyph index of precomposed glyph out of FreeType2). I recommend you to check OpenType renderes like Pango or ICU. Regards, mpsuzuki _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
