summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-24 20:29:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-25 09:52:21 +0100
commitda4a0d1520c501b5f8a4c3385cdc5f76653213f4 (patch)
treef177ba685ad29875454f6a878f46f1c736e413e5 /external
parent3a2f0e4772e7b4646dd518b33aeafb6fd7025179 (diff)
add in latest harfbuzz effort
the document still fails for me, but in a new way which suggests a possible problem on our side. Change-Id: Ic38259653a43b39f9330adc503d085a896c15d2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143246 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.162
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk1
2 files changed, 63 insertions, 0 deletions
diff --git a/external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1 b/external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1
new file mode 100644
index 000000000000..0fd429257b8d
--- /dev/null
+++ b/external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1
@@ -0,0 +1,62 @@
+From 05aa084e67705285941c9acd13151e2a38da8b0f Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Thu, 24 Nov 2022 12:13:31 -0700
+Subject: [PATCH] [PairPos] Another attempt at fixing unsafe-to-break with
+ ValueFormat2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
+
+Test:
+$ hb-shape XBRoya34.ttf ' الأ' --show-flags --script=arab
+---
+ src/OT/Layout/GPOS/PairPosFormat2.hh | 9 +++++----
+ src/OT/Layout/GPOS/PairSet.hh | 5 +++--
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/src/OT/Layout/GPOS/PairPosFormat2.hh b/src/OT/Layout/GPOS/PairPosFormat2.hh
+index 1bb0d60ae..523e0e936 100644
+--- a/src/OT/Layout/GPOS/PairPosFormat2.hh
++++ b/src/OT/Layout/GPOS/PairPosFormat2.hh
+@@ -241,15 +241,16 @@ struct PairPosFormat2_4
+ boring:
+ buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
+
+-
+- buffer->idx = skippy_iter.idx;
+ if (len2)
+ {
+- buffer->idx++;
++ skippy_iter.idx++;
+ // https://github.com/harfbuzz/harfbuzz/issues/3824
+- buffer->unsafe_to_break (buffer->idx - 1, buffer->idx + 1);
++ // https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
++ buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
+ }
+
++ buffer->idx = skippy_iter.idx;
++
+ return_trace (true);
+ }
+
+diff --git a/src/OT/Layout/GPOS/PairSet.hh b/src/OT/Layout/GPOS/PairSet.hh
+index b1d9f83bc..2ad1f004c 100644
+--- a/src/OT/Layout/GPOS/PairSet.hh
++++ b/src/OT/Layout/GPOS/PairSet.hh
+@@ -132,8 +132,9 @@ struct PairSet
+ if (len2)
+ {
+ pos++;
+- // https://github.com/harfbuzz/harfbuzz/issues/3824
+- buffer->unsafe_to_break (pos - 1, pos + 1);
++ // https://github.com/harfbuzz/harfbuzz/issues/3824
++ // https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
++ buffer->unsafe_to_break (buffer->idx, pos + 1);
+ }
+
+ buffer->idx = pos;
+--
+2.38.1
+
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 91af57205ac8..4b97fa208c5b 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/0001-hb-view-Fix-cairo-slanting-condition.patch.1 \
external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1 \
external/harfbuzz/0001-buffer-diff-Fix-check-for-glyph-flag-equality.patch.1 \
+ external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1 \
))
# vim: set noet sw=4 ts=4: