Forum How do I...?

not sure what fonts to include

i'm getting a lot of ??????s in the documents i'm trying to parse

i was reading, which seems helpful, but i never know what fonts to include so prince renders the xhtml correctly

is there a way to emulate with prince how firefox searches for the correct font so i don't have to include every font family?

thanks in advance
We are working on this issue, although it is complicated somewhat by the need to check different fonts on different platforms. For example, on Linux the OpenSymbol font that comes with OpenOffice is a good choice for mathematical symbols, however this font is typically not found on Windows or MacOS/X.

If you can tell me which platform you are running Prince on (Windows, Linux, or MacOS/X) and which characters are showing up as question marks (mathematical symbols? Greek letters? Chinese?) then I should hopefully be able to suggest which fonts to use.
i'm never sure what characters will be in my content, so i can't help you help me there :(

i'm looking around online for a font reference for the major languages that are going unfound..

some african languages

i'm on linux by the way
Since your on Linux, start by checking that you have the necessary fonts installed on your system. Font packages usually start with "ttf", such as the following packages that provide the Chinese fonts from Arphic:

* ttf-arphic-bkai00mp
* ttf-arphic-bsmi00lp
* ttf-arphic-gbsn00lp
* ttf-arphic-gkai00mp

And the following packages that provide Japanese fonts:

* ttf-kochi-gothic
* ttf-kochi-mincho

These package names are for Debian/Ubuntu Linux, but Red Hat and SUSE have similar packages available.

Once the fonts are installed, you need to list the ones that you need in the font-family property, like this:

font-family: Times New Roman, AR PL KaitiM Big5, Kochi Gothic, serif

Running Prince with the --verbose or -v command-line argument will print out exactly which fonts have been used, while the --debug flag will list all the available fonts that have been scanned on the system, which can be handy for debugging.

In the future Prince will attempt to scan intelligently for the default font families (serif, sans-serif, monospace) so that they fallback to appropriate fonts. However this will never be a perfect solution, as unless you explicitly specify the font Prince cannot tell whether you would prefer simplified vs. traditional Chinese for example.
i looked in my /usr/X11R6/lib/X11/fonts, but i don't have any of the fonts you mentioned :shock:

firefox still renders the data fine though, so i must have the correct fonts. is there any way to tell what fonts need to be used based on the data alone? how do browsers etc know what fonts should go with the data?
amoffat wrote:
i looked in my /usr/X11R6/lib/X11/fonts, but i don't have any of the fonts you mentioned

Try running "fc-list : family file | grep -i arphic"