[cairo] Text rendering questions
Ian Britten
britten at caris.com
Wed Oct 29 06:17:59 PDT 2008
Hi all,
As I'm finally getting legible text from my Cairo (PDF) output :)
I'm faced with some more (general) questions...
In all cases, I'm rendering one glyph at a time, using a FT_Face
and a defined position+size. Our rendering pipeline works, and
produces exactly identical output from our various backends
(GDI, GTK, PS, WX, etc), but I'm having problems getting the text
output from Cairo to match.
The two main problems I'm seeing at the moment are:
- The text generally seems to be too small (eg: 10-20 percent, maybe),
but sometimes it's dramatically too-small.
- Sometimes, the wrong font is being used (Italic, Bold, etc)
What should I expect regarding the text size on my output? Should
it match exactly? Or is there some sort of scaling/resolution/etc
coming into play?
[ FWIW, I'm having flashbacks to our own early rendering problems,
where we were overflowing the FT size structures when trying to
load glyphs at extreme sizes. We ended up having to load them at
a fixed size and subsequently scale them ourselves. I'm nervous
that I might be into something similar with Cairo... ]
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...
Obviously I'm looking closer at my own code, but I'm not seeing
anything to account for the discrepancies I'm seeing, so I figured
I better ensure I'm on a solid footing first. :)
I can assemble some screenshots, code snippits, etc, if anyone
wants any clarification.
Thanks for any insight as to what to expect, information, etc.
[ BTW - I'm using Cairo 1.6.4, in case the new release might
have changed some of this ]
Ian
More information about the cairo
mailing list