Forum How do I...?

Font selection

Stephan
Hi,
I am confused by font warnings of Prince.
I am using Suse 9.3 with font-config library. I installed MS truetype corefonts on the system.
Prince outputs the following warning:
prince: /usr/X11R6/lib/X11/fonts/Type1/ariab___-ISO-8859-2.pfb: warning: "Arial, Bold" is not a TrueType font

(Verdana,bold) is embedded in the resulting PDF (checked with pdffonts tool).
After removing the above font file, which is part of the ult1mo fonts, no more warning appears and (Arial,bold) is embedded. - OK!
Why does Prince try to use the type1 font instead of the installed truetype arial font?
How do I configure my system or Prince to use the installed MS truetype fonts WITH installed ult1mo type1 fonts? The ult1mo font cannot be removed because they are used by an other application.

Best regards,
Stephan
mikeday
Hi Stephan,

Prince uses fontconfig to scan for available fonts on Linux, so it seems that if there are two fonts both called Arial installed simultaneously then fontconfig might just be giving us the first one that it finds.

We will investigate this issue and attempt to make Prince more discriminating. However, we will also be adding support for Type1 fonts in the future, so there may need to be a mechanism to specify exactly which font format you prefer.

In the meantime, I think the best solution is to rename one of the fonts, eg. to MonotypeArial, so that Prince can identify unambiguously.

Best regards,

Michael
erelsgl
Here is the output I get with --debug on:

...
prince: debug: font-family: mdk_teams
prince: loading style sheet: /usr/local/lib/prince/style/fonts.css
prince: /usr/X11R6/lib/X11/fonts/75dpi/timR14.pcf.gz: warning: "Times, Regular" is not a TrueType font
prince: used font: Goodfish, Regular
...


It seems to be related to the following section of font.css:
@font-face {
    font-family: serif;
    src: local("Times New Roman"), local("Times"), local("Goodfish"), local("OpenSymbol")
}


(these are the only sections that refer to Times).

Is there a problem in the fonts.css file, or in my system fonts?
amoffat
i edited my fontconfig local config (/etc/fonts/local.conf) to have

<dir>/usr/X11R6/lib/X11/fonts/TTF</dir>


before anything else, so it searched my truetypes first. the warnings went away.