[HarfBuzz] FreeType/Cairo example

Khaled Hosny khaledhosny at eglug.org
Sun Feb 20 12:29:27 PST 2011


On Sun, Feb 20, 2011 at 08:23:39PM +0000, Jonathan Kew wrote:
> On 20 Feb 2011, at 14:39, Khaled Hosny wrote:
> 
> > On Sun, Feb 20, 2011 at 04:29:49PM +0200, Khaled Hosny wrote:
> >> I'm trying to write a simple HB test and thought using FreeType/Cairo
> >> would be the shortest path. I got the code to shape the text, but glyph
> >> positions are wrong (at least horizontal positions); some glyphs are too
> >> close, others are spaced out than they should.
> >> 
> >> I'm not sure what is wrong with the attached code, but I'm not familiar
> >> with any of the FreeType/HarfBuzz/Cairo black magic.
> > 
> > Attached example of the output I'm getting.
> 
> Have you tried a similar example, but with LTR directionality? That might help narrow down the problem area.

I got similar spacing issues with LTR text.

I'm suspecting that the size setting in FT_Set_Char_Size() and
cairo_set_font_size() don't line together, but I'm not sure what would
be the correct use of both.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian



More information about the HarfBuzz mailing list