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

Milan Bouchet-Valat nalimilan at club.fr
Mon Oct 8 21:42:03 CEST 2012


Le lundi 08 octobre 2012 à 14:47 -0400, John Fox a écrit :
> For curiosity, I tried this on my Windows 7 machine:
> 
> > .Tcl("font create test")
> <Tcl> test 
> 
> > tkfont.actual("test") # Wrong
> <Tcl> -family Arial -size 12 -weight normal -slant roman -underline 0 -overstrike 0 
> 
> > tkfont.actual("TkDefaultFont") # OK
> <Tcl> -family {Segoe UI} -size 9 -weight normal -slant roman -underline 0 -overstrike 0 
> 
> > tkfont.actual("systemSystemFont")
> <Tcl> -family Arial -size 12 -weight normal -slant roman -underline 0 -overstrike 0
> 
> Note that 1 matches 3 but not 2.
Indeed. Segoe UI is apparently the default font on Windows 7, so
TkDefaultFont is the best choice. It probably makes sense to make
RcmdrDefaultFont "inherit" the family from TkDefaultFont on all
platforms then. On Mac OS X, it would use the correct font and fix the
bug I reported where it appears, and on Windows 7 it would use the
default Segoe UI instead of Arial. (On Linux, both give me the same font
family, but none is absolutely right, that's another standardization
issue...)


Cheers



More information about the R-SIG-Mac mailing list