Search code examples
c#c++truetype

a simple way to add or modify glyphs in true type fonts (TTF)


I'm looking for a simple way to add a glyph to an existing true type font. I'm wondering if there exists a library (C++ or C#) or a command line tool to support that functionality because generating a TTF from scratch seems to be a really complex task.
The background for this question is that we would like to develop a tool that is able to add a glyph to a font. The glyph would be defined as an outline consisting of multiple contours that are consisting of lists of points (on curve and off curve).


Solution

  • To the best of my knowledge, I have not seen such a commandline tool/library.

    Generating a font may be complex but modifying an existing font can be just as bad.

    When you add a glyph to an existing font, you will need to specify additional things along with it( e.g. unique character code, metrics values, etc). Furthermore you will also need to update quite a few tables in the font file(eg cmap, loca, maxp, etc), depending on the nature of new outline.

    Basically I don't think there is a simple way to add a glyph.

    The best thing I can think of is to use a font editor tool to add your glyphs/create a new font (e.g. FontForge http://fontforge.sourceforge.net/).