[cairo] UserFont size issue (ImageSurface)

Behdad Esfahbod behdad at behdad.org
Mon Feb 9 12:25:50 PST 2009


Ian Britten wrote:
> Ok, I think I've largely got it figured out... (Sweet Mary that wasn't
> fun :( )
> You probably knew this, but it seems that Cairo uses different code
> paths when rendering text to PDF vs PNG, making it rather difficult to
> narrow down the difference.
> 
> In the end though, it seems that when rendering text to PNG, Cairo uses
> the FT flag FT_LOAD_NO_SCALE, indicating that the driver should not
> scale the glyph points before returning them.  Since we had never used
> that flag anywhere ourselves, the 'slot load' callback of our custom
> font driver wasn't set up to check for, nor obey, that flag.

Right...  That's because of the different font options.  I did want to suggest
that, but didn't see any way that your user-font code could behave differently
because of option differences.  Totally forgot that you are using a custom
FreeType backend also...

behdad


> Enhancing out driver accordingly seems to have fixed this problem.
> [ Now, I wonder what other flags are used that we've overlooked... :P ]
> 
> Ian



More information about the cairo mailing list