diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/font.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c index 5a1e61ff..d5296eb9 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -426,7 +426,8 @@ fz_adjust_ft_glyph_width(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm else subw = font->width_default; - if (realw > 0) + /* Sanity check scaling in case of broken metrics. */ + if (realw > 0 && subw > 0) fz_pre_scale(trm, subw / realw, 1); } |