Bug 14369 - Small cex values to text() cause silent graphics failure
Summary: Small cex values to text() cause silent graphics failure
Alias: None
Product: R
Classification: Unclassified
Component: Graphics (show other bugs)
Version: old
Hardware: Other Linux-Debian
: P5 major
Assignee: R-core
Depends on:
Reported: 2010-08-28 04:02 UTC by Ken Yamaguchi
Modified: 2018-04-09 15:31 UTC (History)
1 user (show)

See Also:

PNG showing the same problem as the graphics device. (3.67 KB, image/png)
2010-08-28 04:02 UTC, Ken Yamaguchi

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Yamaguchi 2010-08-28 04:02:07 UTC
Created attachment 1123 [details]
PNG showing the same problem as the graphics device.


The call to text() causes graphics output to fail upon hitting the small cex value.  As the attached file shows, the "3" is not printed at (1,3).  Subsequent graphics commands, such as abline(), also silently fail.

This behavior occurs on updated Debian squeeze (AMD64, r-base-core at 2.11.1-6) and updated Debian lenny (AMD64, r-base-core at 2.7.1-1+lenny1).  The problem does not occur under OS X 10.5.8 running 64-bit R 2.9.2.

The minimum cex value not triggering the problem lies around 0.0001.  0.00001 causes the problem on both the PNG and X11cairo devices.  0.0001 causes the problem on the PNG device but not on the X11cairo device.  A cex value of 0 does not trigger the problem but does print the character.  pdf() prints all 3 numbers, albeit with a full-sized "2".

Thank you for your efforts!
Comment 1 Duncan Murdoch 2010-09-12 14:39:48 UTC
I see this in Ubuntu with the default X11 "cairo" device, but not with the type="Xlib" device, and not on Windows.
Comment 2 Brian Ripley 2010-10-02 13:02:50 UTC
This seems to be a bug in Pango: it is only seen on devices which
use Pango (and not those using fontconfig) for font selection.  And the
failure occurs for size values below 1 on Pango's internal scale (which
depends on the device size).

A workaround has been added for 2.12.0