[R-SIG-Mac] R plot and graphics fonts on Quartz

Simon Urbanek simon.urbanek at r-project.org
Sat May 21 15:22:01 CEST 2011


Carlo,

On May 21, 2011, at 9:10 AM, Carlo Tambuatco wrote:

> This question has probably been asked to death already, I don't know yet...but when plotting using the Quartz framework on OS X, labels do not show up unless the sans font family is selected beforehand.
> 

It usually indicates a problem in your fonts - broken or duplicate fonts. Often going to the Font Book and checking for duplicate or invalid fonts (in particular Arial here) solves the issue.


> My question is, how do you permanently change the default fonts for plots to "sans"? I tried changing the quartz options in the preferences pane of the R.app application, but the option to change font families under quartz is not selectable. 
> 

The default is hard-coded in Quartz to Arial, there is no provision to change it. (The default has historic reasons since the "normal" default Helvetica was incomplete in older OS X versions).


> Is there a way to maybe change the fonts.conf file located in the fonts folder in the RHOME folder? 
> 

No, Quartz uses Apple's font frameworks, not FontConfig. However, fixing the font issue in your system should be the more preferable solution.


> Basically, I want the default fonts set to sans under quartz to that axis labels show up properly.
> 

You can simply use
par(family="sans")
to do that, but, again, fixing your font setup will likely have more lasting effect.

Cheers,
Simon



More information about the R-SIG-Mac mailing list