Skip to content
Prev 11802 / 63421 Next

Fixed width graphics font?

Hi
Simon Urbanek wrote:
I have added fontfamily to the "graphics context" information that can 
be passed from the graphics engine to graphics devices.  Two rather 
important things remain to be done:

(i) the devices need to do something with this information.  As Duncan 
Murdoch pointed out, Windows already allows something similar via a 
device-specific approach to the existing font parameter.  I have 
suggested (but not yet tried to implement) a more device-independent 
approach in http://www.stat.auckland.ac.nz/~paul/R/gpars.html (linked 
off the "R Developer" web page).  I haven't really had feedback on this 
suggestion yet and I intended to elicit more before hacking any code.

(ii) the graphics systems (base and grid) need to allow the user to set 
this information.  grid has a fontfamily gpar, but base has nothing yet. 
  Again a suggested implementation is in 
http://www.stat.auckland.ac.nz/~paul/R/gpars.html and there is a bit 
more in http://www.stat.auckland.ac.nz/~paul/R/fonts.html

Going back to the original question, for Windows, postscript, and pdf at 
least, if you have a mono-spaced font on your system you should be able 
  to use it, but the way in which you specify it will differ (see the 
docs for each device).  In future versions this should become as simple 
as specifying the appropriate font name as a par() for all devices.

Paul