summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-07-04 17:46:55 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-07-09 17:52:45 +0200
commit2b857ab9878d5ca8acd862ae58dafa8d269bc502 (patch)
treec988eb36ea82944745317db863f65ee3f94dcefd /xps
parentcc853795ac090d13adc44926e19d1964f1bcfb09 (diff)
downloadmupdf-2b857ab9878d5ca8acd862ae58dafa8d269bc502.tar.xz
Make synthetic font styles match XPS spec more closely.
Shear by 20 degrees for italic. Use 2% wider metrics for bold.
Diffstat (limited to 'xps')
-rw-r--r--xps/xps_glyphs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xps/xps_glyphs.c b/xps/xps_glyphs.c
index f75815f0..64dac465 100644
--- a/xps/xps_glyphs.c
+++ b/xps/xps_glyphs.c
@@ -332,6 +332,9 @@ xps_parse_glyphs_imp(xps_document *doc, fz_matrix ctm,
else
advance = mtx.hadv * 100;
+ if (font->ft_bold)
+ advance *= 1.02f;
+
if (is && *is)
{
is = xps_parse_glyph_metrics(is, &advance, &u_offset, &v_offset);