[cairo] NO_HINTING problems with custom FT_Face

Ian Britten britten at caris.com
Thu Oct 15 06:44:57 PDT 2009


Ian Britten wrote:
> I was hoping that someone could help me get to the root of a problem
> I'm having when using my custom FreeType font driver via Cairo.
   [ snip ]
> Problem:
> - When I create+draw my text upright and use load_flags=0, the text
>    draws as expected.  However, when I use load_flags=FT_LOAD_NO_HINTING,
>    my text no longer draws.
   [ snip ]

Ok, here's some more info that I hope will illuminate something for
someone:
Attached are two stack traces, showing the calls between my call to
cairo_show_glyphs() until my slotLoadCB() is called, to load the
requested glyph.  The two traces are for the two cases where
load_flags=0 (DEFAULT.txt), and where load_flags=FT_LOAD_NO_HINTING
(NOHINTING.txt).  DEFAULT.txt is the case that works.

The flow through the Cairo code seems to be the same until Cairo
calls FT_Load_Glyph().  In the working case (DEFAULT.txt), the
code goes through some extra FT calls (Autohinter?) while in the
non-working case, the FT_Load_Glyph() calls my slotLoadCB().

I should note that my slotLoadCB() is actually called twice from
cairo_show_glyphs() - Once as shown in the attachments, and a
second time via _cairo_surface_old_show_glyphs_draw_func()/etc.
Since the parameters to my slotLoadCB() were the same in both
cases, I didn't bother to include the second traces here.  However
I can, if requested.

So, is anyone familiar with this FT autohinter stuff, and does
it's presence/absence alter what Cairo does with glyphs?  Might
I be in an untested (broken?) code path (ie: Rendering text with
hinting turned off)?  Is there any other info I could offer to
help get to the bottom of this?

Many thanks for any help...
Ian

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DEFAULT.txt
Url: http://lists.cairographics.org/archives/cairo/attachments/20091015/4cedcb74/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: NOHINTING.txt
Url: http://lists.cairographics.org/archives/cairo/attachments/20091015/4cedcb74/attachment-0001.txt 


More information about the cairo mailing list