Skip to content

Commit 24eac7d

Browse files
author
murrell
committed
bug fix for glyph rendering on quartz()
git-svn-id: https://svn.r-project.org/R/trunk@88411 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 65a33c4 commit 24eac7d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/NEWS.Rd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@
181181
vectors, the same as for \code{list}s, i.e., padding with \code{NULL}
182182
entries if the length is increased. Thanks to \I{Mikael Jagan}'s
183183
\PR{18917}.
184+
185+
\item Fix for glyph rendering on the \code{quartz()} device when
186+
there is other (\dQuote{normal}) text drawn on the device. The
187+
problem was that the text transformation matrix was not reset
188+
so glyphs would be rendered incorrectly (often completely outside
189+
the device, i.e., not visible).
184190
}
185191
}
186192
}

src/library/grDevices/src/devQuartz.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,6 +3160,7 @@ void RQuartz_glyph(int n, int *glyphs, double *x, double *y,
31603160
/* NOTE: that the font needs an inversion (in y) matrix
31613161
because the device has an inversion in user space
31623162
(for bitmap devices anyway) */
3163+
CGContextSetTextMatrix(ctx, CGAffineTransformIdentity);
31633164
CGAffineTransform trans = CGAffineTransformMakeScale(1.0, -1.0);
31643165
if (rot != 0.0) trans = CGAffineTransformRotate(trans, rot/180.*M_PI);
31653166
CTFontRef ctFont =

0 commit comments

Comments
 (0)