summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-font-private.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-font-private.hh15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
index 620d05e8f9..431d0477c2 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
@@ -31,7 +31,6 @@
#include "hb-private.hh"
-#include "hb-font.h"
#include "hb-object-private.hh"
#include "hb-face-private.hh"
#include "hb-shaper-private.hh"
@@ -118,12 +117,12 @@ struct hb_font_t {
/* Convert from parent-font user-space to our user-space */
inline hb_position_t parent_scale_x_distance (hb_position_t v) {
if (unlikely (parent && parent->x_scale != x_scale))
- return v * (int64_t) this->x_scale / this->parent->x_scale;
+ return (hb_position_t) (v * (int64_t) this->x_scale / this->parent->x_scale);
return v;
}
inline hb_position_t parent_scale_y_distance (hb_position_t v) {
if (unlikely (parent && parent->y_scale != y_scale))
- return v * (int64_t) this->y_scale / this->parent->y_scale;
+ return (hb_position_t) (v * (int64_t) this->y_scale / this->parent->y_scale);
return v;
}
inline hb_position_t parent_scale_x_position (hb_position_t v) {
@@ -193,10 +192,10 @@ struct hb_font_t {
klass->user_data.glyph_h_kerning);
}
- inline hb_position_t get_glyph_v_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
+ inline hb_position_t get_glyph_v_kerning (hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph)
{
return klass->get.glyph_v_kerning (this, user_data,
- left_glyph, right_glyph,
+ top_glyph, bottom_glyph,
klass->user_data.glyph_v_kerning);
}
@@ -397,11 +396,7 @@ struct hb_font_t {
}
private:
- inline hb_position_t em_scale (int16_t v, int scale)
- {
- unsigned int upem = face->get_upem ();
- return (v * (int64_t) scale + upem / 2) / upem;
- }
+ inline hb_position_t em_scale (int16_t v, int scale) { return (hb_position_t) (v * (int64_t) scale / face->get_upem ()); }
};
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS