summaryrefslogtreecommitdiff
path: root/source/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-02-10 18:08:23 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-02-10 18:08:23 +0100
commita94ecea1aa6d3ce994782a7dd1d531728463186e (patch)
tree5e79e0ec68729fe7849cedb13ad277d97cc4b524 /source/xps
parent0e91218ff89aee9a24d7cd577de37b0f1bb8331a (diff)
downloadmupdf-a94ecea1aa6d3ce994782a7dd1d531728463186e.tar.xz
Add bold/italic/monospaced/serif flags to fz_font.
Use the flags when selecting a fallback font.
Diffstat (limited to 'source/xps')
-rw-r--r--source/xps/xps-glyphs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/xps/xps-glyphs.c b/source/xps/xps-glyphs.c
index 8cfbbafc..a87c2862 100644
--- a/source/xps/xps-glyphs.c
+++ b/source/xps/xps-glyphs.c
@@ -242,8 +242,10 @@ xps_lookup_font(fz_context *ctx, xps_document *doc, char *base_uri, char *font_u
if (style_att)
{
- font->ft_bold = !!strstr(style_att, "Bold");
- font->ft_italic = !!strstr(style_att, "Italic");
+ font->fake_bold = !!strstr(style_att, "Bold");
+ font->is_bold = font->fake_bold;
+ font->fake_italic = !!strstr(style_att, "Italic");
+ font->is_italic = font->fake_italic;
}
xps_select_best_font_encoding(ctx, doc, font);
@@ -421,7 +423,7 @@ xps_parse_glyphs_imp(fz_context *ctx, xps_document *doc, const fz_matrix *ctm,
else
advance = mtx.hadv * 100;
- if (font->ft_bold)
+ if (font->fake_bold)
advance *= 1.02f;
if (is && *is)