Font Problems

111 views
Skip to first unread message

Gorka Leguina

unread,
Dec 16, 2009, 1:59:47 PM12/16/09
to dompdf
Hi again,

Trying to install new fonts, I get this message:

Unable to locate the ttf2afm / ttf2pt1 executable (checked /var/www/
gorka/pruebas/dompdf0.6/lib/ttf2ufm/ttf2ufm-src/ttf2pt1).

The executable is in that directory, but .exe?? (I'm on Ubuntu 9.10)

Is that my problem?? Thnx.

(dompdf0.6)

Gorka.

BrianS

unread,
Dec 16, 2009, 2:41:16 PM12/16/09
to dompdf
The TTF2AFM setting in dompdf_config.inc.php should probably specify
ttf2ufm instead of ttf2pt1. Try changing that setting and see if it
works. You might also have to modify the permission on the file to
enable execute access.

Note: I haven't had a chance to test this to see if it even works. I
compiled a copy of the executable for my system ... you might have to
do the same for it to work correctly. When the next release is closer
to completion we'll spend some time on this feature to make it a
little more accessible to everyone.

Gorka Leguina

unread,
Jan 11, 2010, 1:42:46 PM1/11/10
to dompdf

> The TTF2AFM setting in dompdf_config.inc.php should probably specify
> ttf2ufm instead of ttf2pt1. Try changing that setting and see if it
> works. You might also have to modify the permission on the file to
> enable execute access.
>
> Note: I haven't had a chance to test this to see if it even works. I
> compiled a copy of the executable for my system ... you might have to
> do the same for it to work correctly. When the next release is closer
> to completion we'll spend some time on this feature to make it a
> little more accessible to everyone.

Hi,

The problem was so simple... this was the TTF2AM definition:

define("TTF2AFM", DOMPDF_LIB_DIR ."/ttf2ufm/ttf2ufm-src/ttf2pt1");

and this the executable name: ttf2pt1.1

Just had to change the name on the location... "/ttf2ufm/ttf2ufm-src/
ttf2pt1.1"

Problem solved!!

Thnx,

Gorka Leguina

Gorka Leguina

unread,
Jan 12, 2010, 6:22:17 AM1/12/10
to dompdf
Hi,

There's something that I'm doing wrong because I'm not able to aim my
objective...

I'm using a two column text with special characters like ", ñ, á,
é, ... (also tried htmlName ("...) and htmlNumber ("...)),
but with that kind of characters, the positioning of my "<div
class="column_box">" it's not respected because the textline is longer
that it should be. Is the same problem as using tables with that kind
of characters.

I loaded the msscorefonts on the dompdf fonts whit ttf2pt but this
didn't resolve my problem (as Brian said in another post, I've to made
my own font). However, I notice some changes on generated PDF font.
How can I create my own font with that kind of special characteres,
with DOMPDF_DEFAULT_FONT to Serif??

I'm using "body, form, input {font-family:Arial, Helvetica, sans-
serif;}" and I want to respect the current font generated...

Thank u so much!!!

Gorka Leguina.

BrianS

unread,
Jan 12, 2010, 2:23:26 PM1/12/10
to dompdf

Your additional problems may be related to a bug, see this issue
report:
http://code.google.com/p/dompdf/issues/detail?id=29&q=font

The issue has been addressed in the developer version of DOMPDF, but a
download for that version isn't widely published. If you would like to
try it out, check out this post:
http://groups.google.com/group/dompdf/msg/608cf69792d05a82

Gorka Leguina

unread,
Jan 15, 2010, 12:40:23 PM1/15/10
to dompdf
> Your additional problems may be related to a bug, see this issue
> report:http://code.google.com/p/dompdf/issues/detail?id=29&q=font
>
> The issue has been addressed in the developer version of DOMPDF, but a
> download for that version isn't widely published. If you would like to
> try it out, check out this post:http://groups.google.com/group/dompdf/msg/608cf69792d05a82

I apologize for insisting but I still having troubles... This are the
steps I followed:

- I'm creating CourierNew, TimesNewRoman and Verdana fonts (with Bold,
Italic and BoldItalic).
- As I'm on Ubuntu, I wasn't able to use the ttf2ufm.exe from
dompdf0.6/lib/ttf2ufm/ so I decided to download ttf2pt1-3.4.4 from
http://ttf2pt1.sourceforge.net and compiling it... so I got the
ttf2pt1 running on my computer. (I didn't use the load_font.php
because it didn't do the conversion, only copy the .ttf to the
destination file)
- I used it to create my fonts, getting 2 docs for each font .afm
and .t1a.
- I made a backup of the original dompdf0.6/lib/fonts/ and copy my
generated fonts there.
- I changed the dompdf_font_family_cache.dist, pointing each font to
my new generated fonts with the right name.
- Also, I created the dompdf_font_family_cache directory and copy the
all fonts and .dist file (I'm not sure this was right... but I read it
from http://code.google.com/p/dompdf/wiki/Installation
- Got: define("DOMPDF_UNICODE_ENABLED", false);

The result of the PDF generation is the same... what am I doing
wrong??

Thank u so much for ur time!!!

Gorka Leguina.

Reply all
Reply to author
Forward
0 new messages