[cairo] User-font branch, hinting?

Peter Clifton pcjc2 at cam.ac.uk
Fri Mar 28 18:05:07 PDT 2008

On Fri, 2008-03-28 at 21:53 -0300, Felipe Sanches wrote:
> hey! I am interested on learning about user-fonts because I intend to
> use it on a Summer of Code project. Can you point me the procedures
> needed to start tinkering with this?
> Where is the repository where this code is currently? Where can I
> learn about the API? Is there sample code using this new feature?

The code is in Behdad's user-font4 branch. Behdad's cairo repository is


With recent git (1.5.x?), try:

mkdir behdad
git clone git://people.freedesktop.org/~behdad/cairo
cd cairo

git checkout origin/user-font4

Or, if you're going to make changes to the cairo code in the repo:
git branch origin/user-font4 local-user-font4
git checkout local-user-font4

Sorry my git-fu isn't so sharp today, but I think the above may be
helpful. (Apologies if you know git already!).

To get started on how to use it, take a look in the "test" directory at
test/user-font.c and test/user-font-ref.png

Of course, there is "src/cairo-user-font.c" which makes a useful read.
Unfortunately, my knowledge of cairo fonts is rather limited, so I'm not
sure I can be of much more help... I don't really know how to use the
_normal_ cairo font API properly, and I don't want to steer you wrong.

Best wishes,

Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,

Tel: +44 (0)7729 980173 - (No signal in the lab!)

More information about the cairo mailing list