summaryrefslogtreecommitdiff
path: root/source/fitz/draw-glyph.c
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-11-11 22:47:47 +0100
committerSimon Bünzli <zeniko@gmail.com>2013-11-27 21:03:13 +0100
commit60336ef6deff24089e00dea02b2435450ea6601e (patch)
tree9d1d6a8f90081fb714151c36fdccddd57788bfbd /source/fitz/draw-glyph.c
parent4ab737fa41a1c925319921f663e017c2c1a17e54 (diff)
downloadmupdf-60336ef6deff24089e00dea02b2435450ea6601e.tar.xz
fix regression from da277059b37380d57028ff79a636f4d725c96e8f
The changes to fz_render_glyph cause the scissor rectangle to no longer match the transformation matrix which causes Type 3 glyphs to be clipped at larger resolutions.
Diffstat (limited to 'source/fitz/draw-glyph.c')
-rw-r--r--source/fitz/draw-glyph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c
index 73f2eb71..bb2de291 100644
--- a/source/fitz/draw-glyph.c
+++ b/source/fitz/draw-glyph.c
@@ -246,6 +246,7 @@ fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colo
fz_glyph_cache *cache;
fz_glyph_key key;
fz_matrix subpix_ctm;
+ fz_irect subpix_scissor;
float size;
fz_glyph *val;
int do_cache, locked, caching;
@@ -267,6 +268,11 @@ fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colo
{
if (font->ft_face)
return NULL;
+ subpix_scissor.x0 = scissor->x0 - floorf(ctm->e);
+ subpix_scissor.y0 = scissor->y0 - floorf(ctm->f);
+ subpix_scissor.x1 = scissor->x1 - floorf(ctm->e);
+ subpix_scissor.y1 = scissor->y1 - floorf(ctm->f);
+ scissor = &subpix_scissor;
do_cache = 0;
}