Update: The script now bottom aligns all the glyphs on the base line, and also allows setting glyph side bearings. Note that Type1/TFM can have maximum of 255 glyphs, so you have to either spread your SVGs over multiple fonts or use OTF/TTF with a suitable engine.Ĭheck FontForge's Python scripting documentation for more details. Glyph.left_side_bearing = glyph.right_side_bearing = 10įont.generate("foobar.pfb", flags=) # type1 with tfm/afm # set glyph side bearings, can be any value or even 0 # create a new glyph with the code point i See the for more information.Īssuming you have FontForge with Python scripting, all the svg files in the current directory numbered from 1-700, the following should create both a Type1, OTF and TTF fonts out of it. Generate a map file mysymbols.map that lists your fonts in the following format mysymbols1 MySymbols1 mysymbols1 }Īfter that, you can access the font in LaTeX like this: You can let FontForge create TeX font metrics too, or you can use afm2tfm to generate these from the. Only 256 characters are accessible in one PS Type 1 font, so if you have 700 symbols, you actually want to make 3 different fonts (or you can make one font and then let pdftex/dvips re-encode them, but this a bit more complicated.) Alternatively, generate an OpenType font, which you can use directly with LuaTeX or XeTeX. Use File->Generate Fonts to generate a (binary) PostScript Type1 font. See also the instructions on the FontForge site. While traditional market proceeds directly benefit TFM programs, we rely largely on donations from individual sponsors. The import is not perfect: For example, you might need to remove some spurious paths, and you should move and scale the glyphs so that they sit on the baseline and their height does not exceed 1000 units (probably around 800 units is fine). Import the SVG files into the different glyphs. Here are some rough step-by-step instructions to generate a font using FontForge and make it available to TeX.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |