summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2013-12-16 08:49:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-19 05:49:27 +0100
commit260fe985255c46fd2eb0aff378da8dccb5f2703f (patch)
tree11691b16243276c1b88c23d470cdb48e5f3fa1a2 /src/3rdparty/harfbuzz-ng/src/hb-font-private.hh
parent4b2c73b4767bcb512cbc17f65186eac5d004db07 (diff)
Update bundled HarfBuzz sources up to 0.9.25
Most important changes: - Myanmar, Indic, Javanese / Buginese shaper improvements - More aggressive shape-plan caching - Additional OpenType language tags Change-Id: I54ed62cfe936c06c18589d09ac119a0f5881a235 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
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