W3C home > Mailing lists > Public > www-svg@w3.org > January 2005

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

From: Jon Ferraiolo <jon.ferraiolo@adobe.com>
Date: Mon, 24 Jan 2005 13:49:34 -0800
To: George Williams <gww@silcom.com>, www-svg@w3.org
Message-id: <6.1.1.1.2.20050124134237.02217340@mailsj-v1.corp.adobe.com>

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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:29 GMT