Jump to content
Your secret tool for flawless typography – Grab 40% off today!

Revised - How to add OpenSource TrueType fonts to Erlang app

Recommended Posts

Posted

Hello,

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:

https://github.com/hwatkins/erlguten

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:

https://github.com/hwatkins/erlguten/blob/master/src/eg_font_7.erl

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:

https://github.com/hwatkins/erlguten/blob/master/src/eg_afm.erl

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,

LRP

eg_font_7.erl

eg_afm.erl

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

Posted

Thanks Ralf,

Can you or another suggest the most effective converter apps?

Thanks again,

LRP

 

 

Posted

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. 

Thanks,

LRP

 

Posted

Hello,

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,

LRP

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 typography network

Discover the fonts from the Germany foundry FDI Type. A brand of Schriftkontor Ralf Herrmann.
Typografie.info – The German typography community
The best typography links of the week.
The type specimens of the world.
The type specimens of the world in one database
×
×
  • Create New...

Important Information

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