diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-16 20:17:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-17 10:31:35 +0100 |
commit | b7badb551990addaa10960a3557c8f83732a560e (patch) | |
tree | b6bb93bca87386a988e8929f39f8c4b94c4d295a /external | |
parent | c2fc5d4fc042460eaac1d6407f45d2f0073bf6a7 (diff) |
use harfbuzz upstream fix instead of workaround
drop temp workaround for problem seen with tdf119074-1.odt
i.e. apply https://github.com/harfbuzz/harfbuzz/pull/3874
for https://github.com/harfbuzz/harfbuzz/issues/3824
Change-Id: I42373f2282d30d7e45ee88b654d3df40f3a6384b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142815
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/harfbuzz/3874.patch.1 | 47 | ||||
-rw-r--r-- | external/harfbuzz/UnpackedTarball_harfbuzz.mk | 5 |
2 files changed, 52 insertions, 0 deletions
diff --git a/external/harfbuzz/3874.patch.1 b/external/harfbuzz/3874.patch.1 new file mode 100644 index 000000000000..74dd91086ad6 --- /dev/null +++ b/external/harfbuzz/3874.patch.1 @@ -0,0 +1,47 @@ +From 26efeceefab9c45b080c3636daaf9452779c79c7 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Fri, 11 Nov 2022 12:45:12 -0700 +Subject: [PATCH] [GPOS.PairPos] Adjust unsafe-to-break for non-zero + ValueFormat2 + +Fixes https://github.com/harfbuzz/harfbuzz/issues/3824 +--- + src/OT/Layout/GPOS/PairPosFormat2.hh | 4 ++++ + src/OT/Layout/GPOS/PairSet.hh | 7 ++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/OT/Layout/GPOS/PairPosFormat2.hh b/src/OT/Layout/GPOS/PairPosFormat2.hh +index 83b093b988..1bb0d60ae2 100644 +--- a/src/OT/Layout/GPOS/PairPosFormat2.hh ++++ b/src/OT/Layout/GPOS/PairPosFormat2.hh +@@ -244,7 +244,11 @@ struct PairPosFormat2_4 + + buffer->idx = skippy_iter.idx; + if (len2) ++ { + buffer->idx++; ++ // https://github.com/harfbuzz/harfbuzz/issues/3824 ++ buffer->unsafe_to_break (buffer->idx - 1, buffer->idx + 1); ++ } + + return_trace (true); + } +diff --git a/src/OT/Layout/GPOS/PairSet.hh b/src/OT/Layout/GPOS/PairSet.hh +index aa48d933c3..b1d9f83bc9 100644 +--- a/src/OT/Layout/GPOS/PairSet.hh ++++ b/src/OT/Layout/GPOS/PairSet.hh +@@ -128,8 +128,13 @@ struct PairSet + + if (applied_first || applied_second) + buffer->unsafe_to_break (buffer->idx, pos + 1); ++ + if (len2) +- pos++; ++ { ++ pos++; ++ // https://github.com/harfbuzz/harfbuzz/issues/3824 ++ buffer->unsafe_to_break (pos - 1, pos + 1); ++ } + + buffer->idx = pos; + return_trace (true); diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index a99f116d80ad..969a7ca2c51c 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -15,4 +15,9 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,harfbuzz)) $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) +# <https://github.com/harfbuzz/harfbuzz/pull/3874> "Adjust unsafe-to-break for non-zero ValueFormat2": +$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ + external/harfbuzz/3874.patch.1 \ +)) + # vim: set noet sw=4 ts=4: |