Re: SVG Font glyphs containing arbitrary SVG content
Chris Lilley <[email protected]> Thu, 10 Sep 2009 15:00:48 +0200
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Organization | W3C |
| Message-ID | <[email protected]> |
On Thursday, September 10, 2009, 12:48:29 AM, Robert wrote: ROC> However, I just tried to see how Webkit and Opera handle arbitrary SVG ROC> content in glyphs, using this simple example: ROC> <svg xmlns="http://www.w3.org/2000/svg" > ROC> <font id="Font"> ROC> <font-face font-family="Test" units-per-em="2048"/> ROC> <glyph unicode="@" horiz-adv-x="1000" d="M128 0V1638H896V0H128zM256 ROC> 128H768V1510H256V128z"> ROC> <rect x="0" y="0" width="1000" height="1000" fill="cyan"/> ROC> </glyph> ROC> </font> ROC> <text x="0" y="100" style="font-family:Test; font-size:80px;">@@@</text> ROC> </svg> ROC> ... and they don't seem to be rendering the <rect>. Is something wrong ROC> with my example? There is an ambiguity in the 1.1 spec, which says The graphics that make up the ‘glyph’ can be either a single path data specification within the ‘d’ attribute or arbitrary SVG as content within the ‘glyph’. but also says If the ‘glyph’ has both a ‘d’ attribute and child elements, the ‘d’ attribute is rendered first, and then the child elements. I believe that some implementations ignore child elements if there is a d attribute. (This ambiguity is the subject of a current errata item). ROC> I also notice that the SVG 1.1 test suite doesn't test anything but ROC> <glyph d="..."/>. Actually, we noticed that too, fairly recently. The next release will fix that. -- Chris Lilley mailto:[email protected] Technical Director, Interaction Domain W3C Graphics Activity Lead Co-Chair, W3C Hypertext CG _______________________________________________ dev-tech-svg mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-svg