[Cairo] Graphite API needs

Sharon_Correll at sil.org Sharon_Correll at sil.org
Fri Aug 22 13:30:59 PDT 2003


Hello, I'm new to this list. Here at SIL International we've been
developing a smart-font technology called Graphite that can be used to
define complex writing system behaviors in an extensible way. It is
extensible because the behaviors are determined by a program of rules that
are then compiled into custom tables in a font. We need this in SIL because
we are dealing with minority language communities whose writing systems are
often not supported by commercial software, and often we are working in
parts of the world where literacy is just becoming an issue and so how the
language should be written is in flux and can't be built into an operating
system or hand-crafted software module.

Graphite was originally developed on Windows but we're just on the verge of
completing a port to Linux, so we're interested in developments like Cairo
that we might be a good fit with our efforts.

Graphite operates at the level of taking a string of characters (i.e.,
Unicode) and converting them into a "segment" consisting of a list of
glyphs and positions (using the tables in the font). The segment also keeps
track of mappings between the glyphs and the characters in order to support
editing operations like mouse clicks and drawing selections and cursors.

It appears that in relation to Cairo, Graphite would be a level just above,
and would use Cairo's text API to do the actual drawing. And also to obtain
glyphs metrics for its glyph-layout process. Does that sound right?

A list of the functions we need to interact with the system are:

(1) getting the font's em-square (in rendered units)
(2) getting metrics of a glyph (bounding box, advance width/height)
(3) getting a font's ascent and descent
(4) getting a glyph's outline in rendered units (or at least a specific x/y
position of a numbered point on the glyph curve)
(5) selecting a font
(6) drawing a sequence of glyphs
(7) inverting a rectangle in order to draw a selection or cursor

I assume cairo_text_extents would handle (2). But I don't think I see
anything in your API to handle (1) or (4).  (I don't see anything
specifically along the lines of (7) either, but we could probably do this a
different way.)

Thanks,
Sharon Correll
SIL International


P.S. Please visit our web page to see more about Graphite:
http://graphite.sil.org. We also have a SourceForge project at:
http://sourceforge.net/projects/silgraphite.





More information about the cairo mailing list