Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c++

c#

truetype

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).

like image 677
chrmue Avatar asked Nov 01 '25 07:11

chrmue


1 Answers

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/).

like image 127
wschang Avatar answered Nov 02 '25 22:11

wschang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!