3

I do not like the default fonts for these languages in linux mint 17.1, but I like the fonts for the latin languages.

I have downloaded, for instance, the chinese fonts AR PL UMing which I like better than the default font WenQuanYi

fc-list ":lang=zh-CN:scalable=true" family 
AR PL UKai TW MBE
WenQuanYi Micro Hei Mono,文泉驛等寬微米黑,文泉驿等宽微米黑
AR PL UKai TW
AR PL UKai HK
AR PL UKai CN
AR PL UMing TW MBE
WenQuanYi Micro Hei,文泉驛微米黑,文泉驿微米黑
AR PL UMing HK
AR PL UMing CN
Droid Sans Fallback
AR PL UMing TW

But how do set up my system to use them as soon as the chinese characters are required ?

My personal application is in R, where I have a data set with chinese characters as well as roman in it , and when draw the plots in PNG, the font WenQuanYi is used since my default font for the roman language has no character for the chinese (I use extrafont to use my roman font, but there is no way to specify a font for each language when plotting).

I wanted to try this from here

There is also a more comprehensive configuration sample under /etc/fonts/conf.avail or /etc/fonts/conf.d (I don't remember exactly which) whose name contains zh-CN. Inside is a set of configuration used for adjusting the exact fallback font order, which is far more suitable than the above method. Just copy the content in the file into ~/.fonts.conf or ~/.config/font-manager/local.conf and change the ordering of fonts to suit your needs.

but there is no files with zh-CN in both directories

1

Different applications have different font settings. In your case, it's not about Linux Mint, nor terminal. The font in your plotting is a default by R. To change it, use R function postscriptFonts(...) or pdfFonts(...) to change the font in output.

Reference: https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/postscriptFonts.html

  • does it work even if my plots are created in png, jpeg ? – Mark Mar 24 '15 at 10:50
  • I don't think so. postscriptFonts is specifically for postscript(), and pdfFonts() for pdf(). There is no corresponding function for jpeg(). However, you can always output pdf or postscript and use imagemagick to convert them into jpg. – Chong Mar 24 '15 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.