[cairo] Objections to changing most text tests to use the internal font?

Behdad Esfahbod behdad at behdad.org
Mon Nov 30 16:30:58 PST 2009


I'm fine with that except that it wouldn't test any of the cairo-ft backend or 
any of the Type1/TrueType/Type3 etc code.  Which is fine.  We need to add 
separate tests for those.

So, my recommendation is to switch all the "cairo_select_font_face()" tests to 
twin.  That leaves all the ft-*.c and bitmap-font.c tests.  Those currently 
use Fontconfig API.  We should instead break them down to a bunch, such  that:

   - They test the cairo Fontconfig API

   - Separate tests for the cairo FreeType API

   - Tests for the different subsetters

What I suggest is:

   - Include one Type1, one TrueType, and one bitmap font in boilerplate/. 
Like we do with surface, have boilerplate/test run the text tests against all of:

   - Twin font
   - FreeType with Type1 font
   - FreeType with TrueType font
   - FreeType with bitmap font

When we add cairo_font_face_create() later, we can extend that to all native 
backends.

As for fonts to ship, WallaWalla from Garrett should do the job:

   http://ux.suse.de/~garrett/public/wallawalla/0.1/WallaWalla.sfd

We can use fontforge to create TrueType and Type1 variants.

Or use that for TrueType, and another face for Type1 so we can distinguish 
them easily.

Anyway, I know this is a bit more than you asked for, but something we should 
have done long ago.

Cheers,
behdad

PS. I expect you'd see bugs with user-font not dealing with font-matrix 
offsets correctly...


On 11/28/2009 10:55 AM, M Joonas Pihlaja wrote:
>
> Hey,
>
> Does anyone have any objcetions to me shifting most of the text test
> cases to use the Twin font?
>
> Until recently a lot of the text tests have been failing for me due to
> mismatches between whatever font which is called "Bitstream Vera" on
> my system and the system used to generate the ref images.  A few
> months ago the stars have aligned for me and now the majority of them
> pass suddenly, so presumably they're now failing with other Bitstream
> Veras.
>
> Cheers,
>
> Joonas


More information about the cairo mailing list