[cairo] Text rendering questions

Behdad Esfahbod behdad at behdad.org
Sun Nov 2 21:49:53 PST 2008


Ian Britten wrote:
> 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...
> 
> [ snip ]
> 
>> All I can suggest is that you check with 1.8.0 and if the problem resists,
>> come back and we'll try to debug it.
> 
> Ok, I finally got a test VM set up, using cairo 1.8.0 (and cairomm
> 1.7.0, and FT 2.3.7), and I'm still seeing the same
> intermittently-incorrect font being used.
> 
> [ As well, my text is still an incorrect size, but I'm willing to
> defer that for now, to focus on just one problem at a time... ]
> 
> 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.

behdad

> Meanwhile, my first approach will probably involve trying to
> figure out where Cairo finally outputs a specific font, and
> try to print out meaningful information (And then somehow try
> to correlate that with what I passed in)
> 
>>> [ My size problem remains, and seems unchanged by any of this ]
>> No idea about the size.  Maybe you are using bitmap fonts?
> 
> No.  In this case, they're mostly the Arial TT font(s) from
> msttcorefonts  (Regular, Bold, Italic, etc)
> 
> Ian



More information about the cairo mailing list