I'm trying to create an SVG-in-OpenType font by adding an 'SVG '-table to an existing font, but the SVG glyph will not render in the final font.
This is my process:
1. I take an existing font and decompile it with ttx (Behdad's version)
2. I add an SVG table with a single svgDoc entry holding an SVG image.
3. I recompile the ttx (without errors) and test the font in Firefox (which supports SVG-in-OpenType).
Although ttx doesn't throw any errors, the SVG glyph doesn't show up — the original glyph is being shown.
My addition to the font looks like this:
<svg>
<svgDoc endGlyphID="4" startGlyphID="4">
<![CDATA[
<!-- svg data -->
]]>
</svgDoc>
<colorPalettes>
</svg>
I've tried the following:
* Using different TTF fonts to transplant my SVGs into
* Using all kinds of different SVGs, including one I took from an existing ttx'ed SVG-in-OpenType font
* Matching other tables to those of existing SVG-in-OpenType (e.g. adding a cmap_format_6 table)
* Decompiling the generated font to see if nothing was being dropped by ttx
I don't know why this doesn't work. It looks so simple, and according to various sources* adding the SVG table should be all there's to it. Inspecting proper SVG-in-OpenType fonts seems to confirm this.
Anybody have an idea what I'm doing wrong?
* https://hacks.mozilla.org/2014/10/svg-colors-in-opentype-fonts/ and http://www.microsoft.com/typography/otspec/svg.htm