Bug 17248 - font fallback for Devices
Summary: font fallback for Devices
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R 3.3.*
Hardware: All All
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2017-03-28 01:10 UTC by Jinsong Zhao
Modified: 2017-03-28 01:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jinsong Zhao 2017-03-28 01:10:54 UTC
In the country that uses non-Latin as the first language, it's very common that strings in xlab and ylab of a plot is in two language, such as Chinese and English.

The font that displays the non-Latin string can not display beautiful latin, especially the space and kern between Latin characters. Thus, it's necessary to set different font face for the Latin and non-Latin strings. In China, we use SimHei to Arial, and SimSun to Times.

However, almost Devices in R can not accept two font faces in a function, such as:

plot(1, type = "n", xlab = "Hello \u4F60\u597D", family = "sans")

Since "sans" can and only can be specific to one font face, e.g., Arial, so "\u4F60\u597D" have to be displayed in a fallback font, such as "SimSun" in a Windows OS. This behavior is even not supported by postscript and PDF Devices.

Therefore, I hope R can support a font fallback that one font family that contains different font, such as:

sans <- c("Arial", "SimHei")

So one character that is not contained in the "Arial" can be displayed in "SimHei".

Thanks in advance.