[cairo] cairo builtin font (in master now!)

Behdad Esfahbod behdad at behdad.org
Thu Sep 25 17:22:17 PDT 2008


Congrats everybody on 1.8.0!  Phew, finally we can let loose on new features.
/me pretend to not have read Carl's message yet...

(Ok, but I had it already pushed before I read...)

So, I have been doing late night hacking on porting the stroke font that Keith
did in Twin to cairo.  The result is a font covering the full ASCII range that
is builtin to cairo.  From the commit notes:

    The font face layer is then modified to use this font if:

      - The toy font face "cairo" is asked for, or

      - No native font backend is available, or

      - The preferred native font backend fails to return a font with
        STATUS_UNSUPPORTED.  No font backend does this right now but
        the idea is to change FreeType to return it if no fonts found
        on the system.

    We also allow building with no font backends now!

    The new doc/tutorial/src/twin.c file tests the twin face at various

So yes, this means that one can compile cairo with no external font backends!
Ok, not so cool for the desktop but hopefully some people see a use in that.

Here's a screenshot of current rendering at various sizes:


Lots of tweaking remains to be done.  Specifically:

  - Hinting

  - Adjust stroke width

  - Bold and oblique versions

There's code for all those in Keith's implementation.  I just am porting it
over.  Will post updates.

The only API-related change here is that the toy font face "cairo" is now
reserved for cairo's internal font face.  Does any one see any issues with that?



More information about the cairo mailing list