diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/glyphcache.c | 8 | ||||
-rw-r--r-- | render/render.c | 22 |
2 files changed, 20 insertions, 10 deletions
diff --git a/render/glyphcache.c b/render/glyphcache.c index 81b1f5d5..23fb5dd1 100644 --- a/render/glyphcache.c +++ b/render/glyphcache.c @@ -297,12 +297,18 @@ evictlast(fz_glyphcache *arena) } fz_error * -fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int gid, fz_matrix ctm) +fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz_matrix ctm) { fz_error *error; fz_key key; fz_val *val; int size; + int gid; + + if (font->cidtogid) + gid = font->cidtogid[cid]; + else + gid = cid; key.fid = font; key.gid = gid; diff --git a/render/render.c b/render/render.c index 1e152410..183672bf 100644 --- a/render/render.c +++ b/render/render.c @@ -145,7 +145,7 @@ puts("render text"); for (i = 0; i < text->len; i++) { - g = text->els[i].g; + g = text->els[i].cid; x = text->els[i].x; y = text->els[i].y; @@ -188,7 +188,7 @@ puts("render (mask color text)"); for (i = 0; i < text->len; i++) { - g = text->els[i].g; + g = text->els[i].cid; x = text->els[i].x; y = text->els[i].y; @@ -239,17 +239,19 @@ fz_renderpath(fz_renderer *gc, fz_pathnode *path, fz_matrix ctm) puts("render path"); - fz_resetgel(gc->gel, 17, 15); + float flatness = 0.3 / ctm.a; + + fz_resetgel(gc->gel, 16, 16); if (path->paint == FZ_STROKE) { if (path->dash) - fz_dashpath(gc->gel, path, ctm, 0.2); + fz_dashpath(gc->gel, path, ctm, flatness); else - fz_strokepath(gc->gel, path, ctm, 0.2); + fz_strokepath(gc->gel, path, ctm, flatness); } else - fz_fillpath(gc->gel, path, ctm, 0.2); + fz_fillpath(gc->gel, path, ctm, flatness); fz_sortgel(gc->gel); @@ -301,17 +303,19 @@ rcolorpath(fz_renderer *gc, fz_pathnode *path, fz_colornode *color, fz_matrix ct { puts("render (mask color path)"); + float flatness = 0.3 / ctm.a; + fz_resetgel(gc->gel, 17, 15); if (path->paint == FZ_STROKE) { if (path->dash) - fz_dashpath(gc->gel, path, ctm, 0.2); + fz_dashpath(gc->gel, path, ctm, flatness); else - fz_strokepath(gc->gel, path, ctm, 0.2); + fz_strokepath(gc->gel, path, ctm, flatness); } else - fz_fillpath(gc->gel, path, ctm, 0.2); + fz_fillpath(gc->gel, path, ctm, flatness); fz_sortgel(gc->gel); |