[cairo] Text output in SVG target

Emmanuel Pacaud emmanuel.pacaud at lapp.in2p3.fr
Tue Jan 8 00:09:35 PST 2008


Le lundi 07 janvier 2008 à 16:08 -0800, Alan W. Irwin a écrit :
> On 2008-01-07 16:14-0500 Dominic Lachowicz wrote:
> 
> > The best solution for getting reasonably accurate, portable output
> > that looks the same across viewers and regardless of what fonts are
> > installed is to embed the glyph as a series of paths. Of course, this
> > comes at the expense of the file's size and human-readability.
> 
> If there is a lot of text in an SVG file (the case that started this thread),
> you are bound to have particular glyphs used more than once in the file.
> (For example, the "e" glyph within this post.)
> 
> Just out of curiosity do you use the obvious space-saving technique of
> storing the glyph paths in a table in the SVG file and using a table look-up
> when you need the series of paths to represent the glyph or do you store
> duplicate versions of glyph paths when the same glyph is used more than once
> in an SVG file?

Currently, the cairo SVG backend stores in a symbol element the
transformed glyph path, which means the glyph path for a given font at a
given size is only stored once.

The symbols are used later for the actual glyph rendering.

That could be improved by trying to store the untransformed glyph path.

	Emmanuel.

-- 
Emmanuel PACAUD
Groupe Virgo
LAPP - Laboratoire d'Annecy-le-Vieux de physique des particules
9, chemin de Bellevue - BP 110
74941 Annecy-le-Vieux CEDEX
France
Tél: (+33)4 50 09 17 89 - Fax: (+33)4 50 27 94 95



More information about the cairo mailing list