LRP Posted February 7, 2017 Share Posted February 7, 2017 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 Link to comment
Ralf Herrmann Posted February 7, 2017 Share Posted February 7, 2017 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
LRP Posted February 7, 2017 Author Share Posted February 7, 2017 Thanks Ralf, Can you or another suggest the most effective converter apps? Thanks again, LRP Link to comment
Ralf Herrmann Posted February 7, 2017 Share Posted February 7, 2017 You should tell us what your operating system is first. Link to comment
LRP Posted February 7, 2017 Author Share Posted February 7, 2017 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 Link to comment
LRP Posted February 9, 2017 Author Share Posted February 9, 2017 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 Link to comment
LRP Posted February 9, 2017 Author Share Posted February 9, 2017 I mean TrueType files. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now