summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2009-07-18 14:21:05 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2009-07-18 14:21:05 +0200
commit7ef9eebe231668caeeb615e3b21cc7e44af2d412 (patch)
tree71f86ba57d4f993ad60cc1f174519fdfa12ad0ce
parent8f0430ccd1a996484a447d18915269ed3565c642 (diff)
downloadmupdf-7ef9eebe231668caeeb615e3b21cc7e44af2d412.tar.xz
Do not attempt to set character size and transform when converting type3 glyph to unicode.
-rw-r--r--mupdf/pdf_unicode.c11
1 files 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++)
{