summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-open-type.hh
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-02-27 09:53:00 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-03-01 06:37:29 +0100
commita6edf9cbe5bd1d1c6bc08733f97fc07812126bde (patch)
tree7013520fe3cf1828c75c3eee562c90c41465b567 /src/3rdparty/harfbuzz-ng/src/hb-open-type.hh
parent5f32c9edce208125f642c86a4bc9e73564386243 (diff)
Update Harfbuzz to 7.0.1
Note: 6.4.x update has to be done in a separate commit because it did not get the update to 6.0.0, so the cherry-pick will not apply. Pick-to: 6.2 6.5 Task-number: QTBUG-111535 Change-Id: I9d4aae98f8267827ec983ca89b1310006c6aee78 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-open-type.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-open-type.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-open-type.hh b/src/3rdparty/harfbuzz-ng/src/hb-open-type.hh
index 290799127a..4c9bfebcec 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-open-type.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-open-type.hh
@@ -147,7 +147,10 @@ struct HBFixed : Type
static constexpr float shift = (float) (1 << fraction_bits);
static_assert (Type::static_size * 8 > fraction_bits, "");
- HBFixed& operator = (typename Type::type i ) { Type::operator= (i); return *this; }
+ operator signed () const = delete;
+ operator unsigned () const = delete;
+ typename Type::type to_int () const { return Type::v; }
+ void set_int (typename Type::type i ) { Type::v = i; }
float to_float (float offset = 0) const { return ((int32_t) Type::v + offset) / shift; }
void set_float (float f) { Type::v = roundf (f * shift); }
public:
@@ -156,9 +159,8 @@ struct HBFixed : Type
/* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */
using F2DOT14 = HBFixed<HBINT16, 14>;
-
-/* 16-bit signed fixed number with the low 12 bits of fraction (4.12). */
using F4DOT12 = HBFixed<HBINT16, 12>;
+using F6DOT10 = HBFixed<HBINT16, 10>;
/* 32-bit signed fixed-point number (16.16). */
using F16DOT16 = HBFixed<HBINT32, 16>;