From 7ef9eebe231668caeeb615e3b21cc7e44af2d412 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 18 Jul 2009 14:21:05 +0200 Subject: Do not attempt to set character size and transform when converting type3 glyph to unicode. --- mupdf/pdf_unicode.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mupdf/pdf_unicode.c b/mupdf/pdf_unicode.c index aba35b0f..1ed6bec0 100644 --- a/mupdf/pdf_unicode.c +++ b/mupdf/pdf_unicode.c @@ -215,10 +215,13 @@ extracttext(pdf_textline **line, fz_node *node, fz_matrix ctm, fz_point *oldpt) float adv; int i, x, y, fterr; - FT_Set_Transform(font->ftface, NULL, NULL); - fterr = FT_Set_Char_Size(font->ftface, 64, 64, 72, 72); - if (fterr) - return fz_throw("freetype set character size: %s", ft_errorstring(fterr)); + if (font->ftface) + { + FT_Set_Transform(font->ftface, NULL, NULL); + fterr = FT_Set_Char_Size(font->ftface, 64, 64, 72, 72); + if (fterr) + return fz_throw("freetype set character size: %s", ft_errorstring(fterr)); + } for (i = 0; i < text->len; i++) { -- cgit v1.2.3