Skip to content
Prev 275552 / 398506 Next

set different font family for strings in mtext or text?

See ?par: check the 'family' paramater.
You can select 'family' for each call to mtext or text.

However, mixing families is rather ugly, and there are font families 
that cover both English and Chinese.

Note that the main problem with postscript() and pdf() is the limited 
support in those languages for non-8-bit character encodings: R cannot 
magically remove restrictions of languages designed in the 1970s.
See also http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf 
(referenced from ?pdf)

Users of other OSes have the option of using cairographics-based 
devices (e.g. cairo_pdf), and so will Windows' users as from 2.14.0 
(which is in RC): however, the font flexibility is far less on 
Windows.
On Wed, 26 Oct 2011, Jinsong Zhao wrote:

            
It certainly can, and the rw-FAQ describes how to do so.
You have to specify the family: R will not guess what you wanted.