download.lst
| 4
external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1
| 62 -----
external/harfbuzz/0001-buffer-diff-Fix-check-for-glyph-flag-equality.patch.1
| 65 ------
external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1
| 104 ----------
external/harfbuzz/0001-hb-view-Fix-cairo-slanting-condition.patch.1
| 29 --
external/harfbuzz/3874.patch.1
| 47 ----
external/harfbuzz/UnpackedTarball_harfbuzz.mk
| 6
7 files changed, 2 insertions(+), 315 deletions(-)
New commits:
commit e272fd31b115e6ea128b593087aeaf4f55119a36
Author: Khaled Hosny <[email protected]>
AuthorDate: Sat Dec 17 23:47:06 2022 +0200
Commit: خالد حسني <[email protected]>
CommitDate: Sat Dec 17 22:44:37 2022 +0000
Update HarfBuzz to 6.0.0
Change-Id: Id371a53a126f2b95b17e642a9c63adafd5aa3d33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144394
Tested-by: Jenkins
Reviewed-by: خالد حسني <[email protected]>
diff --git a/download.lst b/download.lst
index f193a571d4ee..4bf163be50c7 100644
--- a/download.lst
+++ b/download.lst
@@ -218,8 +218,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
# three static lines
# so that git cherry-pick
# will not run into conflicts
-HARFBUZZ_SHA256SUM :=
735a94917b47936575acb4d4fa7e7986522f8a89527e4635721474dee2bc942c
-HARFBUZZ_TARBALL := harfbuzz-5.2.0.tar.xz
+HARFBUZZ_SHA256SUM :=
1d1010a1751d076d5291e433c138502a794d679a7498d1268ee21e2d4a140eb4
+HARFBUZZ_TARBALL := harfbuzz-6.0.0.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts
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
deleted file mode 100644
index 0fd429257b8d..000000000000
---
a/external/harfbuzz/0001-PairPos-Another-attempt-at-fixing-unsafe-to-break-wi.patch.1
+++ /dev/null
@@ -1,62 +0,0 @@
-From 05aa084e67705285941c9acd13151e2a38da8b0f Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <[email protected]>
-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/0001-buffer-diff-Fix-check-for-glyph-flag-equality.patch.1
b/external/harfbuzz/0001-buffer-diff-Fix-check-for-glyph-flag-equality.patch.1
deleted file mode 100644
index 45da1bddf161..000000000000
---
a/external/harfbuzz/0001-buffer-diff-Fix-check-for-glyph-flag-equality.patch.1
+++ /dev/null
@@ -1,65 +0,0 @@
-From 404cb99d86c2d639b4ce2fc59f00f5e66468af34 Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <[email protected]>
-Date: Wed, 23 Nov 2022 15:35:14 -0700
-Subject: [PATCH] [buffer-diff] Fix check for glyph flag equality
-
-I'm not sure if the old behavior was intentional, but it was checking
-that the glyph flags were a subset of the reference buffer's glyph
-flags. I don't see why that is useful. Fix that.
-
-Then make the buffer-verify code ignore flag differences when verifying
-buffers, since our unsafe-to-concat flag at least, is conservative and
-not guaranteed to be produced the same in fragments. See:
-
-https://github.com/harfbuzz/harfbuzz/issues/3888
----
- src/hb-buffer-verify.cc | 5 ++---
- src/hb-buffer.cc | 2 +-
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/src/hb-buffer-verify.cc b/src/hb-buffer-verify.cc
-index 5453e1ca9..1cd52b39b 100644
---- a/src/hb-buffer-verify.cc
-+++ b/src/hb-buffer-verify.cc
-@@ -186,7 +186,7 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer,
-
- bool ret = true;
- hb_buffer_diff_flags_t diff = hb_buffer_diff (reconstruction, buffer,
(hb_codepoint_t) -1, 0);
-- if (diff)
-+ if (diff & ~HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH)
- {
- buffer_verify_error (buffer, font, BUFFER_VERIFY_ERROR "unsafe-to-break
test failed.");
- ret = false;
-@@ -313,7 +313,6 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer,
-
- bool ret = true;
- hb_buffer_diff_flags_t diff;
--
- /*
- * Shape the two fragment streams.
- */
-@@ -382,7 +381,7 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer,
- * Diff results.
- */
- diff = hb_buffer_diff (reconstruction, buffer, (hb_codepoint_t) -1, 0);
-- if (diff)
-+ if (diff & ~HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH)
- {
- buffer_verify_error (buffer, font, BUFFER_VERIFY_ERROR "unsafe-to-concat
test failed.");
- ret = false;
-diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
-index f1e30f241..9e67e680c 100644
---- a/src/hb-buffer.cc
-+++ b/src/hb-buffer.cc
-@@ -2095,7 +2095,7 @@ hb_buffer_diff (hb_buffer_t *buffer,
- result |= HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH;
- if (buf_info->cluster != ref_info->cluster)
- result |= HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH;
-- if ((buf_info->mask & ~ref_info->mask & HB_GLYPH_FLAG_DEFINED))
-+ if ((buf_info->mask ^ ref_info->mask) & HB_GLYPH_FLAG_DEFINED)
- result |= HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH;
- if (contains && ref_info->codepoint == dottedcircle_glyph)
- result |= HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT;
---
-2.38.1
-
diff --git
a/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1
b/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1
deleted file mode 100644
index 43ed88221669..000000000000
---
a/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1
+++ /dev/null
@@ -1,104 +0,0 @@
-From 060ecac949dca29a75538ddeedf015441296334b Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <[email protected]>
-Date: Wed, 23 Nov 2022 16:31:37 -0700
-Subject: [PATCH] [font] Respect subfont slant setting in hb-draw
-
-Fixes https://github.com/harfbuzz/harfbuzz/issues/3890
----
- src/hb-font.cc | 34 ++++++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/src/hb-font.cc b/src/hb-font.cc
-index 93005f4f3..e1699ca2a 100644
---- a/src/hb-font.cc
-+++ b/src/hb-font.cc
-@@ -518,6 +518,7 @@ typedef struct hb_font_get_glyph_shape_default_adaptor_t {
- void *draw_data;
- float x_scale;
- float y_scale;
-+ float slant;
- } hb_font_get_glyph_shape_default_adaptor_t;
-
- static void
-@@ -530,9 +531,10 @@ hb_draw_move_to_default (hb_draw_funcs_t *dfuncs
HB_UNUSED,
- hb_font_get_glyph_shape_default_adaptor_t *adaptor =
(hb_font_get_glyph_shape_default_adaptor_t *) draw_data;
- float x_scale = adaptor->x_scale;
- float y_scale = adaptor->y_scale;
-+ float slant = adaptor->slant;
-
- adaptor->draw_funcs->emit_move_to (adaptor->draw_data, *st,
-- x_scale * to_x, y_scale * to_y);
-+ x_scale * to_x + slant * to_y, y_scale *
to_y);
- }
-
- static void
-@@ -544,12 +546,13 @@ hb_draw_line_to_default (hb_draw_funcs_t *dfuncs
HB_UNUSED, void *draw_data,
- hb_font_get_glyph_shape_default_adaptor_t *adaptor =
(hb_font_get_glyph_shape_default_adaptor_t *) draw_data;
- float x_scale = adaptor->x_scale;
- float y_scale = adaptor->y_scale;
-+ float slant = adaptor->slant;
-
-- st->current_x *= x_scale;
-- st->current_y *= y_scale;
-+ st->current_x = st->current_x * x_scale + st->current_y * slant;
-+ st->current_y = st->current_y * y_scale;
-
- adaptor->draw_funcs->emit_line_to (adaptor->draw_data, *st,
-- x_scale * to_x, y_scale * to_y);
-+ x_scale * to_x + slant * to_y, y_scale *
to_y);
- }
-
- static void
-@@ -562,13 +565,14 @@ hb_draw_quadratic_to_default (hb_draw_funcs_t *dfuncs
HB_UNUSED, void *draw_data
- hb_font_get_glyph_shape_default_adaptor_t *adaptor =
(hb_font_get_glyph_shape_default_adaptor_t *) draw_data;
- float x_scale = adaptor->x_scale;
- float y_scale = adaptor->y_scale;
-+ float slant = adaptor->slant;
-
-- st->current_x *= x_scale;
-- st->current_y *= y_scale;
-+ st->current_x = st->current_x * x_scale + st->current_y * slant;
-+ st->current_y = st->current_y * y_scale;
-
- adaptor->draw_funcs->emit_quadratic_to (adaptor->draw_data, *st,
-- x_scale * control_x, y_scale *
control_y,
-- x_scale * to_x, y_scale * to_y);
-+ x_scale * control_x + slant *
control_y, y_scale * control_y,
-+ x_scale * to_x + slant * to_y,
y_scale * to_y);
- }
-
- static void
-@@ -582,14 +586,15 @@ hb_draw_cubic_to_default (hb_draw_funcs_t *dfuncs
HB_UNUSED, void *draw_data,
- hb_font_get_glyph_shape_default_adaptor_t *adaptor =
(hb_font_get_glyph_shape_default_adaptor_t *) draw_data;
- float x_scale = adaptor->x_scale;
- float y_scale = adaptor->y_scale;
-+ float slant = adaptor->slant;
-
-- st->current_x *= x_scale;
-- st->current_y *= y_scale;
-+ st->current_x = st->current_x * x_scale + st->current_y * slant;
-+ st->current_y = st->current_y * y_scale;
-
- adaptor->draw_funcs->emit_cubic_to (adaptor->draw_data, *st,
-- x_scale * control1_x, y_scale *
control1_y,
-- x_scale * control2_x, y_scale *
control2_y,
-- x_scale * to_x, y_scale * to_y);
-+ x_scale * control1_x + slant *
control1_y, y_scale * control1_y,
-+ x_scale * control2_x + slant *
control2_y, y_scale * control2_y,
-+ x_scale * to_x + slant * to_y, y_scale *
to_y);
- }
-
- static void
-@@ -624,7 +629,8 @@ hb_font_get_glyph_shape_default (hb_font_t *font,
- draw_funcs,
- draw_data,
- (float) font->x_scale / (float) font->parent->x_scale,
-- (float) font->y_scale / (float) font->parent->y_scale
-+ (float) font->y_scale / (float) font->parent->y_scale,
-+ (font->slant - font->parent->slant) * (float) font->x_scale / (float)
font->parent->y_scale
- };
-
- font->parent->get_glyph_shape (glyph,
---
-2.38.1
-
diff --git
a/external/harfbuzz/0001-hb-view-Fix-cairo-slanting-condition.patch.1
b/external/harfbuzz/0001-hb-view-Fix-cairo-slanting-condition.patch.1
deleted file mode 100644
index b76c58eaec8c..000000000000
--- a/external/harfbuzz/0001-hb-view-Fix-cairo-slanting-condition.patch.1
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2e9b270a496de14d3eee9d8b7e1372293bf13888 Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <[email protected]>
-Date: Wed, 23 Nov 2022 16:17:50 -0700
-Subject: [PATCH] [hb-view] Fix cairo slanting condition
-
-hb-draw already does slanting. If NOT hb-draw, we should slant
-through cairo path. Donno why this was untested before.
-
-This was double-slanting with hb-draw, and not slanting without it.
----
- util/helper-cairo.hh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/util/helper-cairo.hh b/util/helper-cairo.hh
-index 37bde1896..fbdbbb1db 100644
---- a/util/helper-cairo.hh
-+++ b/util/helper-cairo.hh
-@@ -104,7 +104,7 @@ helper_cairo_create_scaled_font (const font_options_t
*font_opts)
- cairo_matrix_init_scale (&font_matrix,
- font_opts->font_size_x,
- font_opts->font_size_y);
-- if (use_hb_draw)
-+ if (!use_hb_draw)
- font_matrix.xy = -font_opts->slant * font_opts->font_size_x;
-
- font_options = cairo_font_options_create ();
---
-2.38.1
-
diff --git a/external/harfbuzz/3874.patch.1 b/external/harfbuzz/3874.patch.1
deleted file mode 100644
index 74dd91086ad6..000000000000
--- a/external/harfbuzz/3874.patch.1
+++ /dev/null
@@ -1,47 +0,0 @@
-From 26efeceefab9c45b080c3636daaf9452779c79c7 Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <[email protected]>
-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 4b97fa208c5b..9bc9e326b426 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -15,13 +15,7 @@ $(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 \
- 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: