summaryrefslogtreecommitdiff
path: root/source/fitz/draw-device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-12-19 20:14:23 +0000
committerRobin Watts <robin.watts@artifex.com>2013-12-19 20:16:17 +0000
commit0d837b4a07681331648016cca7093402df68ca9f (patch)
tree2e5e18288e969e368f6191cf27a7c14274ff42d0 /source/fitz/draw-device.c
parente87dc713a74d9d0ab18931e8dd9633ea80767fc3 (diff)
downloadmupdf-0d837b4a07681331648016cca7093402df68ca9f.tar.xz
Solve subpixel rendering problems with 270 degree rotations
It seems that (int)-98.5 = 98, not -99. Use floorf instead.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r--source/fitz/draw-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index 60735460..a92c88b5 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -554,8 +554,8 @@ fz_draw_fill_text(fz_device *devp, fz_text *text, const fz_matrix *ctm,
if (glyph)
{
fz_pixmap *pixmap = glyph->pixmap;
- int x = (int)trm.e;
- int y = (int)trm.f;
+ int x = floorf(trm.e);
+ int y = floorf(trm.f);
if (pixmap == NULL || pixmap->n == 1)
{
draw_glyph(colorbv, state->dest, glyph, x, y, &state->scissor);