Forum How do I...?

Using Adobe Open Type Fonts

srobertjames
Hi. I'm running Prince 7.1 on Win 7, and can easily get it to use some system fonts:

font-family: Georgia;

works beautifully.

However, when I try to get it to use Adobe Palatino, it can't seem to find it. Palatino LT is installed as a Windows font; Windows apps can use it properly. It comes as a series of OTF files, named things like "PalatinoLTStd-Roman.otf" and "PalatinoLTStd-LightItalic.otf". Ideally, I'd like to be able to tell Prince to use "Palatino LT Roman", and have it find it from Windows, and automatically have it use the bold and italic variants when the style sheet turns bold or italic on.

How can I tell Prince to use Palatino? When is it able to use Windows fonts, and when not? How can I get diagnostic info on the fonts that it finds and fails to find?
mikeday
If you run "Prince\Engine\bin\prince.exe --scanfonts PalatinoLTStd-Roman.otf" from the command-line it should print out a @font-face rule giving the font-family name and other details. (You may need to change the paths to make it work). Whatever font-family name it finds should work when using the system font.
srobertjames
Thanks - that works, but only when I give it the full path info.

My understanding is that I should run that for all the subfonts (bold, italic, etc.) I want to use, and put the output in my CSS file. Is that it?

May I ask why Prince doesn't do this automatically? And why it does for some fonts but not others? I'm not happy about having to tie my CSS to my specific font paths.

Thanks for your help!
srobertjames
(For anyone who is following this, I'll note that although Prince generates Windows style paths, you need to manually switch them in the CSS to be Unix style, using forward slashes.)
mikeday
You should not have to do this for system fonts, you should be able to just access them directly by font-family. Did the generate @font-face rule have a font-family name that was different from "Palatino LT"?