[cairo] User font take 2
Behdad Esfahbod
behdad at cs.toronto.edu
Mon May 8 12:28:47 PDT 2006
On Mon, 8 May 2006, Kristian Høgsberg wrote:
> So thinking about this, yeah, this might just work. I was working
> with different assumptions, though; that the API should support on
> demand loading of glyphs (to support fonts with a large number of
> glyphs) and that we would want to do hinting. However, none of the
> custom document fonts (ps and pdf type3 font, svg fonts) that would
> use this feature support hinting and it's probably a safe assumption
> that none of these font formats will be used for big fonts. In the
> event that we need to support a new full featured font format, that's
> better done as a full cairo font backend or in freetype anyway.
I think I should ask what the goal of the user font API is. Is
it yet another toy API? Is it just to satisfy the needs of the
SVG fonts?
Things that I have in mind as possible usecases for the user font
API are:
- An extension mechanism for cairo's font API. Such that you
can bridge arbitrary font rendering systems into cairo without
having to write a font backend. For this the text_to_glyph API
is needed. I suggest we keep both text_to_glyph and
ucs4_to_glyph as is in the current scaled_font backend.
- A unified API that I can hook various pseudo-fonts in Pango
onto. This includes for example the hexbox drawing font and
similar ones that we have not implemented yet (one for having a
single glyph per Unicode script.) For this kind of uses, a
callback-based API is required.
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
More information about the cairo
mailing list