summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-09-18 13:34:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-21 03:09:35 +0000
commit1ed82ab7787656d5ad8d7c2b94926a961f2f7e8a (patch)
treecb9491e0394967e0d436d413847fbef928f64f93 /src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
parenta7f4a61211e284217d256b74ba72a42b083ff937 (diff)
Upgrade Harfbuzz to version 8.2.0
Task-number: QTBUG-117136 Change-Id: I910c8bff2fe521aa02929b9000fa7f38192d1a51 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 08134e458d7fdd0b9565976046821b3903166dd6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5a6d960018c1aac70c46ef1f9481b19ce01734df)
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh b/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
index d156de05d7..a05d1d1a62 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
+++ b/src/3rdparty/harfbuzz-ng/src/hb-subset-plan.hh
@@ -67,6 +67,40 @@ struct head_maxp_info_t
typedef struct head_maxp_info_t head_maxp_info_t;
+struct contour_point_t
+{
+ void init (float x_ = 0.f, float y_ = 0.f, bool is_end_point_ = false)
+ { flag = 0; x = x_; y = y_; is_end_point = is_end_point_; }
+
+ void transform (const float (&matrix)[4])
+ {
+ float x_ = x * matrix[0] + y * matrix[2];
+ y = x * matrix[1] + y * matrix[3];
+ x = x_;
+ }
+ HB_ALWAYS_INLINE
+ void translate (const contour_point_t &p) { x += p.x; y += p.y; }
+
+
+ float x;
+ float y;
+ uint8_t flag;
+ bool is_end_point;
+};
+
+struct contour_point_vector_t : hb_vector_t<contour_point_t>
+{
+ void extend (const hb_array_t<contour_point_t> &a)
+ {
+ unsigned int old_len = length;
+ if (unlikely (!resize (old_len + a.length, false)))
+ return;
+ auto arrayZ = this->arrayZ + old_len;
+ unsigned count = a.length;
+ hb_memcpy (arrayZ, a.arrayZ, count * sizeof (arrayZ[0]));
+ }
+};
+
namespace OT {
struct cff1_subset_accelerator_t;
struct cff2_subset_accelerator_t;