Forum Bugs

leopard 10.5.3 vs hardy/amd64

oliof
So, I have my server running hardy on amd64 and my laptop running leopard (10.5.3, latest updates). On both machines I run the same version of Prince (6.0 rev 6) against an identical set of input files (synchronized via bzr).

On Linux, I get a load of errors like these:

prince: tsoy.html:3437: error: ID personen already defined


Rightfully so, because there are a lot of duplicate IDs in the html source.

On the Mac, I don't see these errors. But I get a warning including a font (GFS Elpis) and it is replaced by the default Times New Roman.

prince -i html --media=print -o tsoy.pdf.tmp tsoy.html && mv tsoy.pdf.tmp tsoy.pdf
prince: warning: bad argument



CSS definitions, font files and relative paths are identical (cross checked with md5sum), as well as the prince calls (marshalled by a Makefile).

This also happens when running prince from a freshly rsynced copy in another location of my leopard machine.

What would be the most useful set of log files/ input files you'd need to see into this matter?
oliof
I reduced the font problem to a very small configuration. Please find the archive with all needed files at http://blog.mausdompteur.de/uploads/prince-fonts.tgz (83k including the font in question, which is free to use - GFS Elpis by the greek font society).
mikeday
There are still some occasional "bad argument" warnings affecting certain fonts on MacOS X Leopard. We hope to correct this problem in the next release. In the meantime, a workaround may be to use an @font-face rule pointing to the actual font file name, like this:
@font-face {
    font-family: MyFont;
    src: url("/Users/me/myfont.ttf")
}

Following which the font in question can be accessed as "MyFont". This should hopefully work.
oliof
That is exactly the setup I have: test.css includes fonts/elpis.css, which looks like this:

@font-face {
  font-family: "GFS Elpis" ;
  src: url("gfs/elpis/GFSElpis.ttf") ;
}


The font in question is an opentype font (ps outlines) converted to truetype with fontforge; I guess that's a good way to get something that's not entirely well-formed and can trigger this behavior
leif
Do you have a PPC based Mac or an Intel based Mac?

I have now tested your file on Leopard 10.5.3 on Intel, Tiger 10.4 PPC nadn Leopard 10.5 PPC. However, I did not get any bad fot messages.[/b]

leif

oliof
Interesting. I have a 10.5.3 intel machine. Lately, the error changed to "GFS Elpis, Regular is not a valid Truetype font". Prince on Linux still doesn't show any errors.
leif
You mentioned above that on Linux, you got error messages because of duplicate id values. While on your Mac — for the same file — you did not get those same duplcate ID messages.

That difference too is very strange. I have not had such problems myself. (I don't run Linux, but I do get such messages whenever there are duplicate ids.) However, those few times I had unexplainable problems, it usually helped doing a reinstall of Prince. FWIW, I always use sudo when I install Prince, whether install it at the default location or I install it somewhere else.

leif

oliof
I found the cause for the "GFS Elpis is not a Truetype Font" error:

I had the Elpis OTF (with PostScript outlines) installed for the operating system, and prince picked up this font instead of the one I explicitly pointed it to.

When I installed the Truetype font in the System, prince's error changed into

haraldw-mac-zrh:~/prince-sandbox haraldw$ prince -vv -i html -s test.css --no-author-style --media=print -o test.pdf test.html
prince: loading HTML input: test.html
prince: loading style sheet: test.css
prince: loading style sheet: fonts/elpis.css
prince: warning: bad argument
prince: used font: Times New Roman, Bold
prince: used font: Times New Roman, Regular
prince: used font: GFS Elpis, Regular


In this case the output pdf did not use the Elpis font, but Times New Roman

Resolving the duplicate by uninstalling the OTF (PostScript) version from the Operating System fixed my issue.

Now I need to find out what the issue with the duplicate ids is.

Leif: Thanks for your pointers. I have a freshly installed 10.5.3 with prince installed using sudo (done a couple of days ago), still no duplicate ID warnings. Since I don't use the IDs in the css for my file, it's a minor issue for me.
leif
I have experienced similar things – since I usually work on Tiger, with an old OS 9 system folder aboard, which has its own fonts, some of which are (older) duplicates.

leif