From 0519485956749c2c84fd91e067f0b6cabd026ad7 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 15 Dec 2011 17:51:17 +0000 Subject: Don't count ROM data in size of fontdescs. The substitute fonts used in a fontdesc are held in ROM, and as such should not count towards the size of a fontdesc. Simple fix; remove the lines that adds that in. --- pdf/pdf_font.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c index ae24df0f..da85b2dd 100644 --- a/pdf/pdf_font.c +++ b/pdf/pdf_font.c @@ -198,7 +198,6 @@ pdf_load_substitute_font(fz_context *ctx, pdf_font_desc *fontdesc, int mono, int fz_throw(ctx, "cannot find substitute font"); fontdesc->font = fz_new_font_from_memory(ctx, data, len, 0); - fontdesc->size += len; /* RJW: "cannot load freetype font from memory" */ fontdesc->font->ft_substitute = 1; @@ -217,7 +216,6 @@ pdf_load_substitute_cjk_font(fz_context *ctx, pdf_font_desc *fontdesc, int ros, fz_throw(ctx, "cannot find builtin CJK font"); fontdesc->font = fz_new_font_from_memory(ctx, data, len, 0); - fontdesc->size += len; /* RJW: "cannot load builtin CJK font" */ fontdesc->font->ft_substitute = 1; -- cgit v1.2.3