[cairo] Text rendering questions
britten at caris.com
Tue Nov 4 04:31:48 PST 2008
Behdad Esfahbod wrote:
>>>>> What should I expect regarding the specified (FT) font? Should it
>>>>> always be used? When my Regular text is drawn using an Italic
>>>>> font, or my Bold text is drawn using a Regular font (And it's very
>>>>> intermittent/inconsistent), I'm left scratching my head...
>> Any suggestions about how I might proceed (given I know nothing
>> about the internals of Cairo)? One difficulty is that I don't
>> have a consistently-reproducible test case showing the problem,
>> which will probably make debugging this ... unpleasant :(
> That makes it hard. Perhaps in your code, make a printout of all FT_Face's you
> pass to cairo (the pointer that is), and the cairo_font_face_t you get. So we
> can see what cairo's doing.
I tried that, but it didn't seem to illuminate much (to me)...
As I'd hope/expect, I got a unique cairo_font_face_t pointer back
for each call to cairo_ft_font_face_create_for_ft_face(), irregardless
of whether I was passing in a new/unique FT_Face pointer, or whether
it was one I had cached.
Is there somewhere in the Cairo code that I could/should look? I'm
not familiar with the internals, but I'm guessing I'm not going to
get to the root of this without rolling up my sleeves... :(
I've been grubbing around in cairo-ft-font.c, since that seems to be
all the FT-specific code. I'm still going on an assumption that the
basic Cairo text rendering works correctly, and my problem must be
related to something I'm doing - With my Cairo/FT interaction being
the primary suspect...
Or should I be looking elsewhere (ie: Wherever the surface is finally
written out? Or maybe in the PDF code?)?
As always, may thanks for any help/info/suggestions!
More information about the cairo