Forum How do I...?

Chinese Charatcers working on dev server, not on live server

elvanto
During my local development on my Mac OS X Mavericks, Chinese characters have been outputting fine just using plain old Arial font. I do have Arial Unicode MS installed but I am not calling it at all.

Somehow I thought Prince was magical and just made it work.

Anyway, when I upload the code to my live server (Ubuntu 14.04), and install all my fonts, the Chinese characters stop working in Arial. I have to manually call Arial Unicode MS which works.

Does Mac do some sort of special trick to make it work locally, or does prince do this and my live server not configured correctly?

Thanks for your help

Ben

mikeday
On MacOS X, Prince will default to "LiSong Pro" for Chinese, or Arial Unicode MS if that is not available. You can check the PDF file under Document Properties > Fonts to see exactly which fonts have been used, or run Prince with --verbose and check the output log messages.

On Ubuntu, you will need to install the Arphic Chinese fonts. For example:
sudo apt-get install "fonts-arphic-*"
elvanto
Thanks Mike that worked! This info would be really handy if it was in the docs :)

I'd also love to add support for as many languages as possible as I also have Japanese clients and maybe more languages in the future such as Korean, Russian etc.

Is there some fonts that I could install to work with those as well?

Thanks again
mikeday
For Japanese, you can install "ttf-kochi-mincho" and "ttf-kochi-gothic". Russian (Cyrillic) should already be supported by the Microsoft Core Fonts, like Times New Roman and Arial. I'm not sure about Korean.
elvanto
Thanks Mike. I'd be happy to do more research into this font thing. Any suggestions on what I should search in Google to look into this further?

Really appreciate your help!

Ben
mikeday
For Korean there are fonts-nanum and fonts-unfonts-core, however you will also need to edit the fonts.css from Prince installed in /usr/lib/prince/style/fonts.css to add at least one Korean font to the default serif font-family.