summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
index d2801fb86ec..992152f176c 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-font-private.hh
@@ -128,6 +128,8 @@ struct hb_font_t {
inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, y_scale); }
inline hb_position_t em_scalef_x (float v) { return em_scalef (v, this->x_scale); }
inline hb_position_t em_scalef_y (float v) { return em_scalef (v, this->y_scale); }
+ inline float em_fscale_x (int16_t v) { return em_fscale (v, x_scale); }
+ inline float em_fscale_y (int16_t v) { return em_fscale (v, y_scale); }
inline hb_position_t em_scale_dir (int16_t v, hb_direction_t direction)
{ return em_scale (v, dir_scale (direction)); }
@@ -541,7 +543,11 @@ struct hb_font_t {
}
inline hb_position_t em_scalef (float v, int scale)
{
- return (hb_position_t) (v * scale / face->get_upem ());
+ return (hb_position_t) round (v * scale / face->get_upem ());
+ }
+ inline float em_fscale (int16_t v, int scale)
+ {
+ return (float) v * scale / face->get_upem ();
}
};