Forums / Developer / Installation of true type fonts

Installation of true type fonts

Author Message

sreejith G

Wednesday 28 July 2004 12:06:44 am

I thought of sharing my experiance with installing fonts on ezpublish. My objective was to enable arial font in pdf generating module.

I followed the instructions from

http://ez.no/ez_publish/documentation/incoming/truetype_font_in_pdf

I downloaded the ttfutils-0.2 package and also the fonts arial.ttf

I tried the command

ttf2afm arial.ttf

I got a file arial.afm as required but the size of the file was showing 0.

Soon I realized that command given is not the actual one and tried the following command

./ttf2afm arial -o arial.afm

from the installation directory of ttfutils-0.2.

I Checked the afm created

All the lines started with C -1 and I manually replaced the -1 with the character offset. ie first c -1 with c 1,
second with c 2 etc .

The next step was to run

php afm2font.php arial

A file called php_arial.font was created.

Installing the font
I Copied the .ttf and the .font file created into lib/ezpdf/classes/fonts/.

Hope this helps

Sreejith
sreejith@marlabs.com
Marlabs .Inc
Austin

Frederik Holljen

Wednesday 28 July 2004 12:50:59 am

Excellent, I posted a link to this message in the doc page.

sreejith G

Wednesday 28 July 2004 1:50:33 am

Thanks Frederik

I uploaded a php file that will replace all the C -1 entries to its corresponding offset values

http://ez.no/community/contributions/3rd_party/syntax_corrector_for_afm_files

Sreejith
sreejith@marlabs.com
Marlabs .Inc
Austin