Jump to content
Check out our exclusive articles, videos and font downloads on Patreon!

Revised - How to add OpenSource TrueType fonts to Erlang app

Recommended Posts



I'm just delving into font technologies, so please forgive whatever ignorance demonstrated by my question.

I'm modifying and extending an Erlang application that generates PDF files:


Currently it supports 13 Adobe Type I fonts. I'd like to add OpenSource TrueType fonts. To do this, I need to end up with modules that looks something like this:


NOTE: You can open *.erl files with any text editor.

In other words, I need to convert TrueType font metrics into the format illustrated in this file.

ErlGuten has a conversion module that may or may not help:


Googling galore, I find many references to TrueType .ttf files, but can't find how to derive/find the actual metrics.

Can kind souls please point the way?

And/or please let me know if I'm missing anything else of importance to complete my task.

All the best,




Link to comment
Ralf Herrmann
5 hours ago, LRP said:

Can kind souls please point the way?

You probably want to start with a font converter app to convert the TrueType fonts to PostScript Type1 fonts. Then you need to convert those to the custom Erlang font format.    

Link to comment

Hi Ralf,

My dev system is Linux (Ubuntu).

Inspired by your post I did find ttf2ps1.  Last update seems to be 2003. But if it compiles, it may do the job. If you are aware of anything more resent or capable, however, I'm all ears.

ErlGuten, the app I'm modifying and extending, does creditable typesetting of Type 1 fonts. But it's more undocumented concept than polished software. My goal is to polish up the code and extend it into a functional typesetting/page makeup system.

I much appreciate your help and, as a font noobie, need all the help I can get. 




Link to comment


Perhaps I asked the wrong question in my previous post. So here's a re-take:

My task is to program a copy fitting/justification routine for a program that generates PDF files.

Which PDF font files provide the metrics I need; e.g. character widths, etc?

Many thanks,


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Our partners

Discover the fonts from the Germany foundry FDI Type. A brand of Schriftkontor Ralf Herrmann.
Get to your apps and creative work. Explore curated inspiration, livestream learning, tutorials, and creative challenges.
Discover the Best Deals for Freelance Designers.
The largest selection of professional fonts for any project. Over 130,000 available fonts, and counting.
Education typography videos. Check out our YouTube channel …
  • Create New...

Important Information

We are placing functional cookies on your device to help make this website better.