summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-font.hh
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-font.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb-font.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/thirdparty/harfbuzz/src/hb-font.hh b/thirdparty/harfbuzz/src/hb-font.hh
index 8fc7f44d44..1b7f445e8b 100644
--- a/thirdparty/harfbuzz/src/hb-font.hh
+++ b/thirdparty/harfbuzz/src/hb-font.hh
@@ -217,9 +217,10 @@ struct hb_font_t
}
hb_bool_t get_nominal_glyph (hb_codepoint_t unicode,
- hb_codepoint_t *glyph)
+ hb_codepoint_t *glyph,
+ hb_codepoint_t not_found = 0)
{
- *glyph = 0;
+ *glyph = not_found;
return klass->get.f.nominal_glyph (this, user_data,
unicode, glyph,
klass->user_data.nominal_glyph);
@@ -238,9 +239,10 @@ struct hb_font_t
}
hb_bool_t get_variation_glyph (hb_codepoint_t unicode, hb_codepoint_t variation_selector,
- hb_codepoint_t *glyph)
+ hb_codepoint_t *glyph,
+ hb_codepoint_t not_found = 0)
{
- *glyph = 0;
+ *glyph = not_found;
return klass->get.f.variation_glyph (this, user_data,
unicode, variation_selector, glyph,
klass->user_data.variation_glyph);
@@ -618,9 +620,7 @@ struct hb_font_t
}
hb_position_t em_mult (int16_t v, int64_t mult)
- {
- return (hb_position_t) ((v * mult) >> 16);
- }
+ { return (hb_position_t) ((v * mult + 32768) >> 16); }
hb_position_t em_scalef (float v, int scale)
{ return (hb_position_t) roundf (v * scale / face->get_upem ()); }
float em_fscale (int16_t v, int scale)