summaryrefslogtreecommitdiff
path: root/src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-01-25 08:16:27 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-01 22:58:09 +0000
commit52a074ada4d612a301818162ee000fdb69f81993 (patch)
tree2f53c8a6d110ecceccaf3c9e6481f47bf7f38e65 /src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh
parent1510b2d3950071c220d3b65d5b94335dc1b54222 (diff)
downloadqtbase-52a074ada4d612a301818162ee000fdb69f81993.tar.gz
Update Harfbuzz to version 6.0.0
Note: This requires an update to the tst_qtextlayout test, because the test assumed that the Arabic string would always yield a run of two glyphs. This was a side effect of how Harfbuzz handled Qt's test font, which has zero font tables and cannot be used for shaping. With the Harfbuzz update, the Arabic text here yields a single cluster instead, which actually makes more sense, so the test has been made a bit more robust to support both cases. Task-number: QTBUG-110338 Change-Id: I93d4cf8e3046dc93224e144d4c81d86bef4918d1 Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit bfe080debbe764d341babfa37b471efb07575847) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh b/src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh
index b289175504..95710ed2be 100644
--- a/src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh
+++ b/src/3rdparty/harfbuzz-ng/src/OT/Layout/GSUB/MultipleSubst.hh
@@ -6,14 +6,17 @@
namespace OT {
namespace Layout {
-namespace GSUB {
+namespace GSUB_impl {
struct MultipleSubst
{
protected:
union {
- HBUINT16 format; /* Format identifier */
- MultipleSubstFormat1 format1;
+ HBUINT16 format; /* Format identifier */
+ MultipleSubstFormat1_2<SmallTypes> format1;
+#ifndef HB_NO_BEYOND_64K
+ MultipleSubstFormat1_2<MediumTypes> format2;
+#endif
} u;
public:
@@ -25,24 +28,30 @@ struct MultipleSubst
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
switch (u.format) {
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
+#ifndef HB_NO_BEYOND_64K
+ case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
+#endif
default:return_trace (c->default_return_value ());
}
}
+ template<typename Iterator,
+ hb_requires (hb_is_sorted_iterator (Iterator))>
bool serialize (hb_serialize_context_t *c,
- hb_sorted_array_t<const HBGlyphID16> glyphs,
- hb_array_t<const unsigned int> substitute_len_list,
- hb_array_t<const HBGlyphID16> substitute_glyphs_list)
+ Iterator it)
{
TRACE_SERIALIZE (this);
if (unlikely (!c->extend_min (u.format))) return_trace (false);
unsigned int format = 1;
u.format = format;
switch (u.format) {
- case 1: return_trace (u.format1.serialize (c, glyphs, substitute_len_list, substitute_glyphs_list));
+ case 1: return_trace (u.format1.serialize (c, it));
default:return_trace (false);
}
}
+
+ /* TODO subset() should choose format. */
+
};