Writting "Metadata" to new OTF Font File #620
-
i created a browser based tool whitch rasterizes the glyphs of a font input. then the user can adjust several inputs to control the look of the new font and download the new font as OTF. to be able to recreate a specifique font i would like to write the parameter values into the font file as kind of "metadata". but im dont know how to do so. im thankful for any help;) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'll want to use the
So there's no guarantee that your tag might not collide with another tag of the same name from a different font authoring software, but if you pick one that's speaking enough for your app name (as far as possible with only 4 ASCII chars), that should be relatively unlikely. In order to add metadata to the table using opentype.js, you can do something like this: // make sure that the table exists
font.metas = font.metas || {};
font.metas.XAPP = '{"foo":"bar","baz","bat"}'; where |
Beta Was this translation helpful? Give feedback.
You'll want to use the
meta
table, the use of which is exactly that, to add meta data. :)According to the name table specification, private tags (that is any arbitrary custom tags like in your case) MUST
So there's no guarantee that your tag might not collide with another tag of the same name from a different font authoring software, but if you pick one that's speaking enough for your app name (as far as possible with only 4 ASCII chars), that should be relatively unlikely.
In order to add metadata to the table using opentype.js, you can do something like this: