- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Mon, 28 Sep 2009 22:59:53 +1000
- To: Alex Danilo <alex@abbra.com>
- Cc: anthony.grasso@cisra.canon.com.au, www-svg@w3.org, public-svg-wg@w3.org
- Message-ID: <11e306600909280559g6f72111dg32a1702515a39cf4@mail.gmail.com>
On Mon, Sep 28, 2009 at 7:14 PM, Alex Danilo <alex@abbra.com> wrote: > Strings of characters need to be mapped to glyphs. Those mappings are 1:1, > n:1, 1:m or n:m. > > It is the glyphs that are being displayed. So the lack of a 'C' glyph is > your issue in this case. The > SVG font is lacking a mapping from the character string 'C' to a glyph used > for presentation. > That's what I mean by the SVG font lacking coverage for character 'C'. >Perhaps I wasn't clear. Suppose the author writes > ><text style="stroke-width:10; font:MySVGFont 100px;">ABC</text> > >Suppose MySVGFont uses the default units per em of 1000, and suppose it > includes glyphs for A and B but not C, and the A and B glyphs use <path> > elements to render the letters, with the stroke-width inherited from the > <text>. Then the stroke used for A and B will be about 1px wide, but the > stroke used for C will be 10px wide. The problem is that for characters > covered by the SVG font, stroke-width (and everything else that uses user > units) is interpreted in the font coordinate system, but for all other > characters stroke-width is interpreted in the user unit coordinate system > for the <text>. > > Thanks for the clarification, and yes you are correct. > > There are 2 preferred methods to deal with this: > 1) the authoring tool gets it right by making sure the glyphs exist in the > SVG font; or preferably > 2) the 'missing-glyph' exists in the SVG font. > > (2) covers basically all the problems you have with this feature and > personally I > prefer that. Authors will see pretty quickly what's wrong. > In both cases you're assuming completely static text. But OK. Actually I wonder how 'missing-glyph' is supposed to interact with the font matching specified by CSS. It appears that the SVG 'font-family' property is normatively defined by CSS: http://www.w3.org/TR/SVG/text.html#FontPropertiesUsedBySVG When a CSS user-agent can't find glyphs for a character in the font(s) specified by the author in 'font-family', the CSS font matching algorithm requires the user-agent to locate a font that does support the character, searching every font on the user's system if necessary: http://www.w3.org/TR/CSS2/fonts.html#algorithm Does SVG intend to alter the behaviour of the CSS font matching algorithm when an SVG Font with 'missing-glyph' is specified in 'font-family'? I can't find anything in the spec to confirm this. If so, in what manner? Rob -- "He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]
Received on Monday, 28 September 2009 13:00:40 UTC