Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create .ttf (true type font) file programmatically

Tags:

I'm interested in creating my own .ttf file using my own code. I did some research and found Apple's specification for .ttf files. I'm having trouble understanding it though. Here is an excerpt:

"A TrueType font file consists of a sequence of concatenated tables. A table is a sequence of words. Each table must be long aligned and padded with zeroes if necessary." https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html

I opened up a .ttf file with notepad++, expecting to see the tables described above, but just got a bunch of incomprehensible stuff. See attached screenshot.

Screenshot

My question: What are these tables?

Can anybody expand on what I need to do to create these tables? I'm newer to writing code, so maybe the problem is my lack of coding knowledge. If that's the case, could someone point me to a reference where I can educate myself on these tables?

like image 422
brownfox Avatar asked Jun 20 '16 12:06

brownfox


1 Answers

Take a look at OpenType Cookbook about how to program fonts. If you want to simply take a look at the tables you mentioned, you'll need a tool like TTX/FontTools to convert the binary tables to something more readable (an XML file in this case).

like image 183
RoelN Avatar answered Sep 28 '22 06:09

RoelN