[R-SIG-Mac] Ugly default Tk font on Mac OS

David Winsemius dwinsemius at comcast.net
Mon Oct 8 21:15:26 CEST 2012


On Oct 8, 2012, at 11:10 AM, Milan Bouchet-Valat wrote:

> Le lundi 08 octobre 2012 à 10:54 -0700, David Winsemius a écrit :
>> Just as a point of reference. With a recently installed update to Snow
>> Leopard (yes, I'm way behind that adoption curve) and Rcmdr version
>> 1.8.4 ( I'm not a user and I see this is out-of-date) , I get:
>> 
>> tkfont.actual("RcmdrDefaultFont")
>> <Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 
> Interesting. Do you get the same if you run my small test?
> 
> library(tcltk)
> .Tcl("font create test")
> tkfont.actual("test") # Wrong
> tkfont.actual("TkDefaultFont") # OK
> tkfont.actual("systemSystemFont) # Wrong
> 

> .Tcl("font create test")
<Tcl> test 
> tkfont.actual("test") # Wrong
<Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 
> tkfont.actual("TkDefaultFont") # OK
<Tcl> -family {Bitstream Vera Sans} -size -12 -weight normal -slant roman -underline 0 -overstrike 0 
> tkfont.actual("systemSystemFont) # Wrong

(Actually there was a trailing "+" sign aft the last one because of amissing quote.

> tkfont.actual("systemSystemFont") # Wrong
<Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 

I don't know if I need to update to the current Rcmdr, since this was earlier done without it being loaded. But I did and then here goes:
> require(Rcmdr)> library(tcltk)
> .Tcl("font create test")
Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class = "tclObj") : 
  [tcl] named font "test" already exists.
> tkfont.actual("test") # Wrong
<Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 
> tkfont.actual("TkDefaultFont") # OK
<Tcl> -family {Bitstream Vera Sans} -size -12 -weight normal -slant roman -underline 0 -overstrike 0 
> tkfont.actual("systemSystemFont") # Wrong
<Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 

I see a "Script Window and an Output Window but admit considerable difficulty with its very non-Mac-ish interface conventions (no cut and paste, unclear what the submit button requires for proper operation);

I seem to be getting the same font being identified when I run these tests from the "Script Window" but the Output Window was not allowing me to copy to the Clipboard in the various efforts I have made. This is the output of the Save Output as ... pulldown menu:

> tkfont.actual("test")
<Tcl> -family {Bitstream Vera Sans} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 


> tkfont.actual("TkDefaultFont")
<Tcl> -family {Bitstream Vera Sans} -size -12 -weight normal -slant roman -underline 0 -overstrike 0 


-- 
David Winsemius, MD
Alameda, CA, USA



More information about the R-SIG-Mac mailing list