diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-10-02 14:19:52 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-10-02 16:36:35 +0100 |
commit | 8114f2b816e15d0cf98811fd37e80d24d00962a0 (patch) | |
tree | 35f4330cd5090daf2c6ea05f75bd124744a16061 /source | |
parent | 903a9154f80ccf8d4badb7102d60a3c543896c5c (diff) | |
download | mupdf-8114f2b816e15d0cf98811fd37e80d24d00962a0.tar.xz |
Don't stretch CJK substitute fonts.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/font.c | 2 | ||||
-rw-r--r-- | source/pdf/pdf-font.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c index 387e3617..e705c229 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -410,7 +410,7 @@ static fz_matrix * fz_adjust_ft_glyph_width(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm) { /* Fudge the font matrix to stretch the glyph if we've substituted the font. */ - if (font->ft_substitute && font->width_table /* && font->wmode == 0 */) + if (font->ft_stretch && font->width_table /* && font->wmode == 0 */) { FT_Error fterr; int subw; diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index 38dd2b58..2f3fa13f 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -218,6 +218,7 @@ pdf_load_substitute_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fontnam } fontdesc->font->ft_substitute = 1; + fontdesc->font->ft_stretch = 1; } static void @@ -239,6 +240,7 @@ pdf_load_substitute_cjk_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fon } fontdesc->font->ft_substitute = 1; + fontdesc->font->ft_stretch = 0; } static void |