[cairo] Toy font cleanup

Behdad Esfahbod behdad at behdad.org
Wed Dec 17 12:15:29 PST 2008


Hi,

I finally got to clean up how toy fonts are created.  The commit log says what
needs more testing:

commit f7ab65e9b0c0f08be8d294e90131baa2decf1f1d
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Dec 17 06:25:50 2008 -0500

    Clean up toy font face handling

    This commit moves the toy-to-real mapping from the scaled font creation
    time to font face creation.  A toy font face will keep an internal ref
    to an implementation face.  Then cairo_scaled_font_create() will simply
    substitute the implementation face before creating anything.

    This also modifies the cairo-ft toy creation in that we now create a
    non-resolved pattern and store it in a cairo-ft font-face.  We then
    do the resolving and unscaled font creation at scaled-font creation
    time.  This also means that cairo_ft_font_face_create_for_pattern()
    now accepts non-resolved patterns too, and does the right thing about
    them.  As much as that can be called right.

    Some testing of toy font creation performance is in order, as is testing
    win32 and quartz font backends.



I also found that currently font_matrix translation is added twice with user
fonts: once by gstate, another by the font.  Not sure how to fix it easily.
Thinking about it.

behdad


More information about the cairo mailing list