summaryrefslogtreecommitdiff
path: root/raster
diff options
context:
space:
mode:
Diffstat (limited to 'raster')
-rw-r--r--raster/glyphcache.c17
-rw-r--r--raster/render.c6
2 files changed, 18 insertions, 5 deletions
diff --git a/raster/glyphcache.c b/raster/glyphcache.c
index e2d93bc9..fe03524e 100644
--- a/raster/glyphcache.c
+++ b/raster/glyphcache.c
@@ -352,9 +352,22 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz
ctm.e = fz_floor(ctm.e) + key.e / 256.0;
ctm.f = fz_floor(ctm.f) + key.f / 256.0;
- error = font->render(glyph, font, cid, ctm);
- if (error)
+ if (font->ftface)
+ {
+ error = fz_renderftglyph(glyph, font, cid, ctm);
+ if (error)
+ return error;
+ }
+ else if (font->t3procs)
+ {
+ error = fz_rendert3glyph(glyph, font, cid, ctm);
+ if (error)
return error;
+ }
+ else
+ {
+ return fz_throw("uninitialized font structure");
+ }
size = glyph->w * glyph->h;
diff --git a/raster/render.c b/raster/render.c
index bbdf019f..90ead6a7 100644
--- a/raster/render.c
+++ b/raster/render.c
@@ -315,7 +315,7 @@ rendertext(fz_renderer *gc, fz_textnode *text, fz_matrix ctm)
fz_irect clip;
fz_matrix tm, trm;
fz_glyph glyph;
- int i, x, y, cid;
+ int i, x, y, gid;
tbox = fz_roundrect(fz_boundnode((fz_node*)text, ctm));
clip = fz_intersectirects(gc->clip, tbox);
@@ -339,7 +339,7 @@ text->trm.a, text->trm.b, text->trm.c, text->trm.d);
for (i = 0; i < text->len; i++)
{
- cid = text->els[i].cid;
+ gid = text->els[i].gid;
tm.e = text->els[i].x;
tm.f = text->els[i].y;
trm = fz_concat(tm, ctm);
@@ -348,7 +348,7 @@ text->trm.a, text->trm.b, text->trm.c, text->trm.d);
trm.e = QUANT(trm.e - fz_floor(trm.e), HSUBPIX);
trm.f = QUANT(trm.f - fz_floor(trm.f), VSUBPIX);
- error = fz_renderglyph(gc->cache, &glyph, text->font, cid, trm);
+ error = fz_renderglyph(gc->cache, &glyph, text->font, gid, trm);
if (error)
return error;