Skip to content

cex option in the text function

3 messages · Fairouz_Makhlouf@hgsi.com, Paul Murrell, Brian Ripley

#
Hi,
I am using the "text" function to write text on a graph and I am using the
cex option to specify the size of my text.  It looks like if I specify any
value < 0.5 the size does not change.  Anybody noticed that?  Any help?

Thanks


Fairouz Makhlouf
Human Genome Sciences
(301)610-5790  x2552
http://www.hgsi.com/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
2 days later
#
Hi
R can only use the fonts that are available in the system it is installed
on.  This means that sometimes it has to use the nearest thing to what the
user requests.

On some systems, when it does not give exactly what the user asks for, it
gives a warning.  For example, the following is a transcript of a session on
my (UNIX/X11) system:
Warning messages:
1: X11 used font size 8 when 2 was requested
2: X11 used font size 8 when 4 was requested
3: X11 used font size 8 when 5 was requested
4: X11 used font size 8 when 6 was requested
5: X11 used font size 8 when 7 was requested

However, notice that this warning is only given once (i.e., if I issue the
commands again, the warnings are not repeated -- this is because the font is
not reloaded).

To further complicate things, not all devices give this warning (e.g., my
old Windows system does not -- we should fix this if current Windows systems
still have the problem).

On the brighter side, this problem should only occur onscreen -- text
scaling should come out ok in PostScript output (because it uses scalable
fonts).

Does that help to explain the effect you are seeing?

Paul

p.s.  Onscreen, Hershey vector fonts should look ok too (because they are
scalable), but I have discovered that this does not work as it should -- I
am fixing this now.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Mon, 25 Jun 2001, Paul Murrell wrote:

            
Not quite.  This warning is given if the X11 driver itself altered the size
you requested by more than 10%, in an attemot to get it satisfied.
It does not check what the X11 font server actually gave you, which could
be quite different.

I don't understand why the X11 device has a lower limit of 8 (pixels, I
believe).  With anti-aliasing, text can be readable much lower.
No other device does the fudging....  On Windows you should have scalable
fonts (at least in the default families) and get the size you ask for. The
allowed range is 2 to 100 points (not pixels).  In practice the text seems
unreadable below about 4 points on my laptop.
I think that it is confined to the X11 device.