How to add metadata to WOFF file?
css, font-face, fonts, webfonts
Solution
Im not sure why you would need to add the metadata to the font, it works perfectly well without the metadata.xml
The xml file only adds information for font designers or vendors to include licensing or other information.
Top of css file:
@font-face {
font-family: font_name";
src: url('fonts/font_name.eot');
src: url('fonts/font_name.woff') format('woff'), url('fonts/font_name.ttf') format('truetype'), url('fonts/font_name.svg') format('svg');
font-style: normal;
font-weight: normal;
}
And then for example:
body {
font-family: "droid sans", Verdana;
}
Edit1:
Create somewhere a folder called myfonts place in that folder your metadata.xml the font.ttf(source font) and the sfnt2woff.exe (located here: http://people.mozilla.org/~jkew/woff/sfnt2woff.exe)
Create a text file open it, place this inside it
sfnt2woff -v 1.0 -m metadata.xml droid_sans.ttf
save it to that folder and call it: do-it-now.bat
Go to the folder and click once you are done. A font.woff should appear with metadata.xml added to it.
Usage for sfnt2woff:
sfnt2woff [-v <maj>.<min>] [-m <metadata.xml>] [-p <private.dat>] <otffile>
package OpenType <otffile> as WOFF, creating <otffile>.woff
Options:
-v <maj>.<min> set font version number (major and minor, both integers)
-m <metadata.xml> include metadata from <metadata.xml> (not validated)
-p <private.dat> include private data block
Problem
I need to add a metadata.xml to a WOFF file that I have created using font-squirrel in order to use it with @font-face. I want to add a metadata.xml to WOFF file like this one (that explains all about it): http://www.w3.org/TR/WOFF/#appendix-a I was told I can do it with this sfnt2woff but it is NOT USER FRIENDLY and quite complicated. I was wondering if there are other ways to do it (font-squirrel? other font convertors?) thanks, Alon