Forum Bugs

Installed fonts not being found

wachunga
Using Prince 9.0 rev 4 on Ubuntu 12.04.4 LTS, simple references to fonts are falling back to DejaVu for some reason. I've tried quoting the font-family values etc, but no luck.

Am I expected to add these manually to fonts.css? I assumed that was only necessary for the base font types like serif etc. If font-config can find them, shouldn't prince?

$ cat simple.html
<html>
<body>
  <p style="font-family: Dingbats">Lorem ipsum</p>
  <p style="font-family: Nimbus Sans L">Lorem ipsum</p>
  <p style="font-family: Nimbus Sans">Lorem ipsum</p>
  <p style="font-family: Arial">Lorem ipsum</p>
  <p>Lorem ipsum</p>
</body>
</html>


$ fc-list
Century Schoolbook L:style=Bold
Century Schoolbook L:style=Bold Italic
Century Schoolbook L:style=Italic
Century Schoolbook L:style=Roman
DejaVu Sans Mono:style=Bold
DejaVu Sans Mono:style=Book
DejaVu Sans:style=Bold
DejaVu Sans:style=Book
DejaVu Serif:style=Bold
DejaVu Serif:style=Book
Dingbats:style=Regular
Liberation Mono:style=Bold
Liberation Mono:style=Bold Italic
Liberation Mono:style=Italic
Liberation Mono:style=Regular
Liberation Sans Narrow:style=Bold
Liberation Sans Narrow:style=Bold Italic
Liberation Sans Narrow:style=Italic
Liberation Sans Narrow:style=Regular
Liberation Sans:style=Bold
Liberation Sans:style=Bold Italic
Liberation Sans:style=Italic
Liberation Sans:style=Regular
Liberation Serif:style=Bold
Liberation Serif:style=Bold Italic
Liberation Serif:style=Italic
Liberation Serif:style=Regular
Nimbus Mono L:style=Bold
Nimbus Mono L:style=Bold Oblique
Nimbus Mono L:style=Regular
Nimbus Mono L:style=Regular Oblique
Nimbus Roman No9 L:style=Medium
Nimbus Roman No9 L:style=Medium Italic
Nimbus Roman No9 L:style=Regular
Nimbus Roman No9 L:style=Regular Italic
Nimbus Sans L:style=Bold
Nimbus Sans L:style=Bold Condensed
Nimbus Sans L:style=Bold Condensed Italic
Nimbus Sans L:style=Bold Italic
Nimbus Sans L:style=Regular
Nimbus Sans L:style=Regular Condensed
Nimbus Sans L:style=Regular Condensed Italic
Nimbus Sans L:style=Regular Italic
Standard Symbols L:style=Regular
URW Bookman L:style=Demi Bold
URW Bookman L:style=Demi Bold Italic
URW Bookman L:style=Light
URW Bookman L:style=Light Italic
URW Chancery L:style=Medium Italic
URW Gothic L:style=Book
URW Gothic L:style=Book Oblique
URW Gothic L:style=Demi
URW Gothic L:style=Demi Oblique
URW Palladio L:style=Bold
URW Palladio L:style=Bold Italic
URW Palladio L:style=Italic
URW Palladio L:style=Roman


$ prince simple.html --debug
prince: debug: loading license: /usr/lib/prince/license/license.dat
prince: loading style sheet: /usr/lib/prince/style/fonts.css
prince: debug: loaded resource: /usr/lib/prince/style/fonts.css
prince: debug: loaded resource: type: no
prince: Loading document...
prince: loading HTML5 input: simple.html
prince: loading document: simple.html
prince: debug: loaded resource: simple.html
prince: debug: loaded resource: type: no
prince: debug: loaded document: simple.html
prince: debug: sniffed doctype: XHTML
prince: Applying style sheets...
prince: loading style sheet: /usr/lib/prince/style/xhtml-ns.css
prince: debug: loaded resource: /usr/lib/prince/style/xhtml-ns.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /usr/lib/prince/style/common.css
prince: debug: loaded resource: /usr/lib/prince/style/common.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /usr/lib/prince/style/hyph.css
prince: debug: loaded resource: /usr/lib/prince/style/hyph.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /usr/lib/prince/style/mathml.css
prince: debug: loaded resource: /usr/lib/prince/style/mathml.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /usr/lib/prince/style/svg.css
prince: debug: loaded resource: /usr/lib/prince/style/svg.css
prince: debug: loaded resource: type: no
prince: Preparing document...
prince: Converting document...
prince: debug: pack
prince: debug: font request: Dingbats
prince: debug: font scan: Dingbats
prince: debug: font scan: Dingbats, 0 matches
prince: debug: font scan: Times New Roman
prince: debug: font scan: Times New Roman, 0 matches
prince: debug: font scan: DejaVu Serif
prince: debug: font scan: DejaVu Serif, 2 matches
prince: debug: font scan: OpenSymbol
prince: debug: font scan: OpenSymbol, 0 matches
prince: debug: font scan: AR PL UMing CN
prince: debug: font scan: AR PL UMing CN, 0 matches
prince: debug: font scan: AR PL SungtiL GB
prince: debug: font scan: AR PL SungtiL GB, 0 matches
prince: debug: font scan: Kochi Mincho
prince: debug: font scan: Kochi Mincho, 0 matches
prince: debug: font scan: Lohit Hindi
prince: debug: font scan: Lohit Hindi, 0 matches
prince: debug: font scan: Ani
prince: debug: font scan: Ani, 0 matches
prince: debug: font scan: Mukti Narrow
prince: debug: font scan: Mukti Narrow, 0 matches
prince: debug: font scan: Lohit Punjabi
prince: debug: font scan: Lohit Punjabi, 0 matches
prince: debug: font scan: Lohit Gujarati
prince: debug: font scan: Lohit Gujarati, 0 matches
prince: debug: font scan: Lohit Tamil
prince: debug: font scan: Lohit Tamil, 0 matches
prince: debug: font scan: Lohit Telugu
prince: debug: font scan: Lohit Telugu, 0 matches
prince: debug: font scan: Lohit Kannada
prince: debug: font scan: Lohit Kannada, 0 matches
prince: debug: font scan: MalOtf
prince: debug: font scan: MalOtf, 0 matches
prince: debug: font scan: Lohit Oriya
prince: debug: font scan: Lohit Oriya, 0 matches
prince: used font: DejaVu Serif, Book
prince: debug: font request: Nimbus Sans L
prince: debug: font scan: Nimbus Sans L
prince: debug: font scan: Nimbus Sans L, 0 matches
prince: debug: font request: Nimbus Sans
prince: debug: font scan: Nimbus Sans
prince: debug: font scan: Nimbus Sans, 0 matches
prince: debug: font request: Arial
prince: debug: font scan: Arial
prince: debug: font scan: Arial, 0 matches
prince: debug: font request: serif
prince: debug: writing output: simple.pdf
prince: Finished: success

Pulse Energy

mikeday
Prince uses fontconfig, so it should be able to find installed system fonts. Are they TrueType/OpenType fonts, though?
wachunga
Aha, that's the issue. They're Type 1. Thanks for the prompt response.

Pulse Energy

wachunga
PS, why doesn't Prince support Type 1? They appear quite common in the printing industry.

Pulse Energy

mikeday
There has been less demand for them, and we have time constraints: with so much to implement, we have to juggle features based on priority.