Re: Request for clarification of <glyph d="...

George,
Perhaps overly simplified, the way to look at the 'd' attribute is that it 
just provides glyph geometry. The <text> element which invokes the given 
font (and thus a particular glyph within the font) fills and strokes the 
relevant glyphs using the 'fill' and 'stroke' properties on the <text> 
element. The 'd' attribute (after various transformations from font 
coordinates into the user coordinate system) provides the geometry of the 
shape which is filled and stroked.

The transformation from font coordinates to user coordinates is a bit 
tricky. Unlike most of SVG where you transform coordinate systems, in the 
special case of the 'd' attribute, you transform coordinate values 
individually. This is necessary so that SVG fonts will apply stroke-width 
in an intuitive manner (and in a manner such that SVG fonts stroke in an 
equivalent manner to system fonts).

Jon

At 12:24 PM 1/24/2005, George Williams wrote:

>When looking through the spec for the d (path) attribute of the <glyph>
>tag, I could not find anything that said how it was painted.
>
>Presumably it is filled, presumably with an inherited colour.
>
>In PostScript, in the Font dictionary there are two entries PaintType
>(which says whether glyphs should be stroked or filled) and StrokeWidth
>(which says how to stroke them). Is there anything equivalent for SVG
>fonts?
>
>I'm aware that if I want to stroke something I can place child elements
>inside the glyph, but that makes it less obvious that the font has a
>consistent behavior.
>
>(I'm currently working on stroked fonts in fontforge, and just wondered
>if I were missing something).
>
>Thanks,
>George Williams
>http://fontforge.sf.net/

Received on Monday, 24 January 2005 21:49:46 UTC