I have a source of SVG files created by program potrace, which has created a separate for each component of a multi-segment character. If I simple-mindedly create glyph definitions using these same <path>s the character will not display. If I jam all the path instructions into the "d=" attribute of the <glyph> the character displays.
The SVG spec says that <glyph> elements are containers and explicitly says they can contain <path> elements. It just doesn't work (tested in Chrome, Opera, Safari).
Here's the smallest example I could cut down to:
<html>
<head>
<meta charset="utf-8" />
<title>SVG font test sample04</title>
<style type="text/css">
@font-face {
font-family: 'sample04';
src: url('sample04.svg#sample04') format('svg');
}
.sample04 { font-family: "sample04", verdana, helvetica; }
</style>
</head>
<body class="sample04"> xE014 |  |  | </body>
</html>
sample04.svg
<?xml version="1.0" encoding="UTF-8" ?>
<svg version="1.1" xmlns = 'http://www.w3.org/2000/svg'>
<defs>
<font id="sample04" horiz-adv-x="800">
<font-face font-family="sample04" />
<glyph unicode="" horiz-adv-x="800"
d="M0,0h200v200h-200z M400,0h200v200h-200z"/>
<glyph unicode="" horiz-adv-x="800">
<path d="M0,0h200v200h-200z"/>
<path d="M400,0h200v200h-200z"/>
</glyph>
</font>
</defs>
</svg>
Note that the two glyphs have the same information, the first contained entirely within the <glyph> d= attribute, the second having the information separated into two <path> elements. I have tried with just a single <path> element with no better results.
So is this just another case where specs are sparkly and browsers are not up to it?
Note: the reason I care so much is that I have nearly 5000 of these SVG files to embed into a font, and didn't really want to get so heavily into XML transformations to convert the sources...