[R-SIG-Mac] [R] Mac OS X R.app has trouble rendering certain fonts.

David Winsemius dwinsemius at comcast.net
Sat Jul 3 15:45:50 CEST 2010


On Jul 3, 2010, at 1:49 AM, Carlo Tambuatco wrote:

>
> On Jul 2, 2010, at 9:37 PM, David Winsemius wrote:
>
>> As far I can remember you have never offered either sessionInfor(),  
>> nor a sample problem in R code, nor an explicit description of what  
>> is being produced, nor a pdf file that can be examined. I have run  
>> demo(plotmath) and it appears not to exercise fonts ot any  
>> exceptional degree .... no theta's, tau's or gamma's. Do you care  
>> to exapnd on your difficulties?
>>
>> -- 
>> David.
>
> From sessionInfo()
>
> R version 2.11.1 (2010-05-31)
> i386-apple-darwin9.8.0
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] tools_2.11.1
>
>
> demo(plotmath) produces a table of equations loaded with sigmas and  
> pi's, alphas, omicrons, upsilons, etc...

Yes, I did miss the lower right corner of the second page (out of  
five) where the Greek letters were demonstrated but certainly did  
notice the set relations and arrows section. What I was asking for is  
an explicit expansion on the term you used ..."messed up". Your  
description of problems does not mimic those that I (and others) were  
earlier having,  were solved by removed corrupted versions of the  
Symbol font. In that instance printing to the Quartz device produced  
small empty boxes where Greek letters should have appeared and this  
happened also when pdf or tiff were used as output devices.

>
> I'm not sure what demo you're running quite frankly.
>
> How else do you want me to "expound on my difficulties"?

More specifics, especially in light of your next stated limitations.

> I've said as straightforwardly as I can what is happening. My  
> newsgroup client doesn't allow me to post images to this newsgroup,  
> so it is difficult for me to show you what I mean, so if you've run  
> demo(plotmath) you should know which fonts I am referring to.

It's not actually a newsgroup but rather a plain-text mailing list.

The default output device is set with the options function:

?device

However, when I try that, I still see a Quartz plot with:
 > options(device="X11")
 > plot(1)

What I needed to do to get X11 plotting was:

dev.off() # closing the default Quartz device

Then X11 gets the output. If this is desired for every session then  
put it in .Rprofile or some other startup mechanism ... see the  
Installation and Administration manual and

http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#The-current-and-startup-working-directories

-- 
David.



>
>
>
>>
>>
>> On Jul 2, 2010, at 8:48 PM, Carlo Tambuatco wrote:
>>
>>> On Fri, Jul 2, 2010 at 4:10 PM,  <sgruber at berkeley.edu> wrote:
>>>> I  recently experienced  the same problem.  Text  that was  
>>>> missing from
>>>> plots in the Quartz window appeared on plots that were sent  
>>>> directly to a
>>>> pdf file. Interestingly,  text that was printed using the  
>>>> expression
>>>> function did appear in the quartz window, for example,
>>>> ylab=expression(hat(psi))
>>>>
>>>> As Marc wrote, the problem was resolved when I used Fontbook to  
>>>> resolve
>>>> duplicated fonts, which for me were Arial and Helvetica stored at  
>>>> both the
>>>> System and User level.   Hopefully this will work for you as well.
>>>>
>>>> --Susan
>>>>
>>>> Susan Gruber
>>>> UC Berkeley
>>>
>>> I did have some duplicated fonts in my font book. So I resolved the
>>> duplicates but it did not take care of the problem. There are  
>>> still no
>>> letters or numbers being rendered in quartz. Only in X11. I looked  
>>> up
>>> the quartzFont() function, to see if it might help, but so far
>>> nothing. Quartz is the graphics engine that renders PDF, so if it
>>> renders in PDF it should render in Quartz and vice versa. But that  
>>> is
>>> not the case apparently.
>>>
>>> I hope that somebody has any additional input as to why this  
>>> happens.
>>>
>>>
>>>>
>>>>> EDIT:
>>>>>
>>>>> Okay, it seems that X11 renders the fonts etc...okay
>>>>>
>>>>> Typing in:
>>>>>
>>>>> X11()
>>>>> demo(plotmath)
>>>>> dev.off()
>>>>>
>>>>> seemed to render everything including the fonts fine, so I don't  
>>>>> think
>>>> any
>>>>> of my fonts are corrupted.
>>>>>
>>>>> But is there a way to configure R to set X11 as the default  
>>>>> device for
>>>> graphics? Right now, it uses quartz as its default device for  
>>>> rendering to
>>>>> the screen. I'm a bit of a newbie here, so could somebody  
>>>>> explain how to
>>>> add to my R config file to have the default device be X11?
>>>>>
>>>>>
>>>>>
>>>>> On Jul 1, 2010, at 1:00 PM, Marc Schwartz wrote:
>>>>>
>>>>>> On Jul 1, 2010, at 11:50 AM, Carlo Tambuatco wrote:
>>>>>>> I noticed this running a few graphics demos the other day.
>>>>>>> In particular the plotmath and the persp graphics demos,  
>>>>>>> certain fonts
>>>> don't seem to render on the demos.
>>>>>>> The plotmath demo displays certain math equations on a quartz  
>>>>>>> window
>>>> that don't render properly, and the persp demo displays a 3D  
>>>> model of a
>>>> mountain with labels on the graph rendered in a certain font.  
>>>> (None of the
>>>> data labels render at all.)
>>>>>>> This problem appeared recently, (like last week), and has not  
>>>>>>> happened
>>>> before. I'm fairly new to using the R gui and R in general, so I  
>>>> don't
>>>> really know where to check if I have the proper true type fonts
>>>> available on my computer or if it is a problem within R itself.  
>>>> This
>>>> doesn't appear to be a problem with the functioning of R itself,  
>>>> just an
>>>> inability for it to render certain fonts on graphical displays. I  
>>>> just
>>>> want to fix it now before I use it in a major project that
>>>> requires the rendering of fonts onto the screen for presentations
>>>> etc...
>>>>>> You might want to review this reply by Simon to a similar post
>>>> recently:
>>>>>> https://stat.ethz.ch/pipermail/r-sig-mac/2010-June/007531.html
>>>>>> Another resource that might be relevant:
>>>>>> http://www.maclife.com/article/news/howto_clear_your_macs_font_cache
>>>>>> HTH,
>>>>>> Marc Schwartz
>>>>>
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-SIG-Mac mailing list