[R-SIG-Mac] Help on the quartz font problem

Yanyuan Zhu caoanroad4800 at gmail.com
Sat Jul 13 05:13:23 CEST 2013


Dear David

I tried to hide all my personal fonts in the directory /Users/(home)/Library/Fonts, and use the system fonts only, then it works fine. You are right, thanks !


On Jul 13, 2013, at 1:54 AM, David Winsemius <dwinsemius at comcast.net> wrote:

> 
> On Jul 12, 2013, at 3:45 AM, Yanyuan Zhu wrote:
> 
>> Dear All, I got some problems in displaying my font when I plot by R.
>> 
>> Here's the environment I use
>> x86_64-apple-darwin10.8.0
>> R version 3.0.1 (2013-05-16) -- "Good Sport"
>> 
>> When I try to plot a figure in either Rstudio or Emacs(with ESS), for example, the following command
>> 
>> plot(Dep.real.ln~AggGRP.real.ln,
>>     ylab="Depreciation (ln)", 
>>     xlab=expression(paste(Sigma, " GRP (ln)"))
>>     )
>> abline(DepAggGRP.lm)
>> b0 <- round(DepAggGRP.lm.sum$coefficients[1,1], 2)
>> b1 <- round(DepAggGRP.lm.sum$coefficients[2,1],2)
>> r2 <- round(DepAggGRP.lm.sum$r.squared,2)
>> eqn <- bquote(italic(y)==.(b0)+.(b1)*italic(x)*"," ~~r^2==.(r2))
>> #italic(y) == .(b0) + .(b1) * italic(x) ","~~R^2 == .(r2))
>> text(9.5, 7.0, eqn, pos=4)
>> 
>> I got the output pdf like attached. Obviously the font fails to display greek words in xlab, and some basic operation symbols in text(). I try to open the pdf in PDF viewer, say, acrobat reader, it works fine, as attached.
>> 
>> After googling a while, I see it might be due to the quartz settings. But I really dont know how to do that: can I change my settings, to let my quartz display plot font correctly, just like the acrobat reader does, plz?
>> 
> 
> I suspect you have two copies of the Symbol font on you machine, one of which is corrupt,  and that AcrobatReader is smarter than RStudio in deciding which one to access. Use Fontbook.app (possibily in /Applications/Utilities/ if not in /Applications/ ) to see if my guess is correct ...  and if it is, then delete the one that displays a blank page.
> 
> -- 
> David.
> 
> 
>> thanks in advance.
>> 
>> here are some of my  R output that might be needed.
>> 
>>> quartzFont()
>> Error in checkQuartzFont(family) : 
>>  argument "family" is missing, with no default
>>> quartzFonts()
>> $serif
>> [1] "Times-Roman"      "Times-Bold"       "Times-Italic"    
>> [4] "Times-BoldItalic"
>> 
>> $sans
>> [1] "Helvetica"             "Helvetica-Bold"       
>> [3] "Helvetica-Oblique"     "Helvetica-BoldOblique"
>> 
>> $mono
>> [1] "Courier"             "Courier-Bold"        "Courier-Oblique"    
>> [4] "Courier-BoldOblique"
>> 
>> 
>> -- 
>> <Screen Shot 2013-07-12 at 6.35.43 PM.png><Screen Shot 2013-07-12 at 6.36.34 PM.png>_______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> David Winsemius
> Alameda, CA, USA
> 
> 



More information about the R-SIG-Mac mailing list