Forum How do I...?

Font Family selection under MacOSX.

mike.bds
Hello,

I'm trying to generate a PDF using the Mac version of PrinceXML, using a particular font ("ITC Officina Sans - Book"). On Windows, it works fine (once I had a TTF version of it).

I installed the same TTF font on the Mac, but Prince just ignored it (and moved to the next specified font in the CSS). I had tried font-family of "ITC Officina Sans", "ITC Officina Sans Book", "ITC Officina", "OfficinaSans-Book", and "OfficinaSans"... none seemed to work.

However, if I did this in the CSS file (and made the text in question just "sans-serif"), it worked:

@font-face {
   font-family:sans-serif;
   font-style:normal;
   font-weight:normal;
   src: url("/path/to/font/OFFICISB_0.TTF");
}

Running PrinceXML with the "--verbose" option then tells me: "used font: ITC Officina Sans, Book"

Is Prince (under OSX) not picking up the font properly because of the "Book" style in the font, instead of "Normal"? Is there a "proper" way to specify in the "font-family:" CSS attribute this font/face? ("font-style: Book;" didn't seem to work?).

Thanks for your time. :)
Mike.
mikeday
Yes, it looks as if Prince considers the "Book" in the font name to be an unknown modifier and ignores the font. I have added this bug to the roadmap and we will fix it for the next maintenance release.
mikeday
This bug should be fixed now in Prince 6.0 rev 2. Thanks for reporting the issue! :)
Montgomery
First, thanks for version 6 rev 4.

Similar issue:
The Garamond that comes with Windows is a decent typeface for the screen.
On the other hand, Adobe Garamond Premier Pro is an awesome typeface family for print.

Prince seems willing to use the plainer Garamond (or Georgia, or many others), but refuses to use the much better Adobe Garamond.

Here's a sample style, including all the ways I can think to say "please use the pretty one":

font: 11pt/1.26 "Garamond Premier Pro", "GaramondPremrPro", "Garamond Premr Pro", "Adobe Garamond Premier Pro", "AdobeGaramondPremrPro", "Adobe Garamond Premr Pro", Georgia, "Times New Roman", serif;


But it just uses Georgia.

Is there a way to determine the correct way to spell a font's name?
mikeday
Is Adobe Garamond Premier Pro a TrueType font? If it is a PostScript Type 1 font or an OpenType CFF font then Prince won't be able to use it until we add support for Type 1 fonts.
Montgomery
It's says "OpenType Layout, Digitally Signed, PostScript Outlines".

:( Sounds like there's the answer.

Thanks for the quick response, and a great program.

So..., given that you just released a new rev, how's that Type 1 support going? Can I help?
mikeday
Currently we are actually looking at support for OpenType features such as automatic ligatures, so fonts are definitely on our mind. Support for PostScript fonts is in the roadmap, and you never know, we may be able to move it up a notch or two. :)
Montgomery
Looking forward to it; can't imagine how to program all that stuff.

Thanks again for the prompt service, excellent product and fast iterations.

(By the way, that trick of using prince-text-replace for ligature replacements is pretty cool.)
mikeday
We now have a beta release of Prince 7.0 which does support OpenType fonts with PostScript/CFF outlines.