[cairo] UserFont size issue (ImageSurface)

Ian Britten britten at caris.com
Fri Jan 30 06:39:56 PST 2009


Hi all,
I'm investigating a sizing problem with my custom [FreeType based]
UserFont that seems to only occur when using an ImageSurface, and was
wondering if anyone knew of any apparent reason for the discrepancy
I'm seeing?

Outputting to PDF works correctly, and TT fonts are working correctly
too.  Basically, I'm seeing this:

                 |     PDF     |    Image      |
         --------|-------------|---------------|
         TrueType| Correct (1) |  Correct  (2) |
         --------|-------------|---------------|
          MyFont | Correct (3) | Incorrect (4) |
         --------|-------------|---------------|

I can confirm that in case #3 and case #4, I'm setting the exact same
font size (in user units).  As well, my code makes no distinction
of the surface type it is rendering to.

The code for MyFont doesn't do anything other than implement the
required 'render' functionality, which just draws the strokes of my
glyph.  I'm not doing anything with any of the 'extent' stuff, but
maybe I should be?  It's working for PDF though, which is what has
me confused...

I'm using cairomm 1.7.2, cairo 1.8.6, and FT 2.3.7

Anyways, I'm getting ready to look deeper into this (Although I'm
not really sure where to look), but if anyone had any information
that might help, I'd really appreciate it!
Ian


More information about the cairo mailing list