[R-SIG-Mac] R commander fonts on R 3.4.0

peter dalgaard pdalgd at gmail.com
Thu May 18 19:22:18 CEST 2017


> On 17 May 2017, at 21:28 , Fox, John <jfox at mcmaster.ca> wrote:
> 
> Dear Peter,
> 
> First, thank you very much for persisting with this. I greatly appreciate it.
> 
>> -----Original Message-----
>> From: Peter Dalgaard [mailto:pdalgd at gmail.com]
>> Sent: Wednesday, May 17, 2017 2:52 PM
>> To: Simon Urbanek <simon.urbanek at r-project.org>
>> Cc: Fox, John <jfox at mcmaster.ca>; r-sig-mac at r-project.org
>> Subject: Re: [R-SIG-Mac] R commander fonts on R 3.4.0
>> 
>> A few more data points:
>> 
>> I tried building Tcl/Tk 8.6.6 from the sources from sourceforge.
>> Contrary to what it says on the package, it insists on building Tcl and
>> Tk as frameworks, which in turn requires that R's configure needs
>> special instructions. This works reasonably well for simple tcltk stuff
>> (demos, the CRAN selection menu), but unfortunately, library(Rcmdr)
>> causes an "Abort trap: 6" almost immediately. (I get a sense of deja vu
>> about this... Did Brian try something similar years ago?)
> 
> I believe that Brian mentioned to me years ago that he was able to get R (and the Rcmdr package) to work fine with a native version of Tcl/Tk for Macs. Beyond that, I don't recall.

The thing I recall was something like "We tried this approach but it crashed immediately so we gave up", but I may well be mistaken, or it was some other library, or...

> 
>> 
>> It does actually seem to work to build R against the system-supplied
>> v.8.5 frameworks. However, this is Aqua-based, and the fonts are a bit
>> weird (smooth, but way too small) and the Rcmdr menus get moved to the
>> top bar.
> 
> Moving the menus to the top bar is desirable, in my opinion, because it's what Mac users expect. If the problem is simply with the font sizes, I should be able to adjust that automatically, as I do now.

The attached (which at least you and Simon should get, but may get scrubbed for the mailing list)  shows how it looks with Aqua-Tcl/Tk using the ActiveState binaries for 8.6.6, after I increased the font sizes to legibility. Obviously, these do not crash like the source compiles do....better not get started on commenting upon _that_ situation. 

As you see, it is pretty close to usable with a few misfeatures: The background colouring is off in places and the highlighting, counterproductively, comes out black-on-blue rather than white-on-blue. All functionality that I tried appeared to be present, even the data editor.

Incidentally, in the background, you see the regular XQuartz Rcmdr when using the TclTk from the R-3.3 packages (with the smooth fonts). 

> 
>> 
>> I am pretty sure by now that all this stuff is a generic tcltk build
>> problem and way out of John's domain. (Thanks for posting the font code,
>> John. I hope I can get around to having a closer look at it at some
>> point. Those .Tcl(paste()) constructs make me cringe a bit, but not all
>> are easily eliminated.)
> 
> If you see a better way to do this, of course I'd appreciate that. It took a fair amount of work to adjust the fonts so that they look right on Windows, macOS, and Linux systems.

Most of what I see is probably shortcomings of the R/Tcl interface. Ideally, everything should be tcl() calls and tclObj's, but ideas like getting an argument list from tk.actual() and using that in tkfont.create() do not quite fit in with the current toolbox.

-pd 


> 
> Best,
> John
> 
>> 
>> -pd
>> 
>>> On 16 May 2017, at 23:52 , peter dalgaard <pdalgd at gmail.com> wrote:
>>> 
>>> 
>>>> On 16 May 2017, at 21:03 , peter dalgaard <pdalgd at gmail.com> wrote:
>>>> 
>>>> I don't think the config flags for R matter in this regard. The
>> behaviour is completely paralleled by wish8.6:
>>> 
>>> Hmmm, not sure the wish ::tk::pkgconfig thing proves anything, after I
>> tried some of the ActiveState installs and a source build. This stuff is
>> making my head spin!
>>> 
>>> However, I discovered that it is possible to install R-3.4.0.pkg as
>> usual, and then a customized install of (say) R-3.3-branch-
>> mavericks.pkg, omitting everything except the Tcl/Tk stuff. That gives
>> you R 3.4.0 and Rcmdr with antialiased fonts.
>>> 
>>> --
>>> Peter Dalgaard, Professor,
>>> Center for Statistics, Copenhagen Business School Solbjerg Plads 3,
>>> 2000 Frederiksberg, Denmark
>>> Phone: (+45)38153501
>>> Office: A 4.23
>>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> --
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000
>> Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Office: A 4.23
>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20170518/6f58b717/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 366375 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20170518/6f58b717/attachment-0001.png>


More information about the R-SIG-Mac mailing list