Skip to content

Help on the quartz font problem

3 messages · Yanyuan Zhu, David Winsemius

#
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?

thanks in advance.

here are some of my  R output that might be needed.
Error in checkQuartzFont(family) :
  argument "family" is missing, with no default
$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"


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-07-12 at 6.35.43 PM.png
Type: image/png
Size: 45506 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-07-12 at 6.36.34 PM.png
Type: image/png
Size: 26038 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0003.png>
#
On Jul 12, 2013, at 3:45 AM, Yanyuan Zhu wrote:

            
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.
#
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: