harfbuzz: upgrade to 12.2.0
* 0001-Fix-applying-synthetic-slight-to-glyph-origins-5629.patch.1 has been fixed upstream Downloaded from https://github.com/harfbuzz/harfbuzz/releases/download/12.2.0/harfbuzz-12.2.0.tar.xz Change-Id: I61c8edc0286389fe476b9ba84e8eac8f19f2016a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193444 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
+2
-2
@@ -327,8 +327,8 @@ GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
HARFBUZZ_SHA256SUM := e5c81b7f6e0b102dfb000cfa424538b8e896ab78a2f4b8a5ec8cae62ab43369e
|
||||
HARFBUZZ_TARBALL := harfbuzz-12.1.0.tar.xz
|
||||
HARFBUZZ_SHA256SUM := ecb603aa426a8b24665718667bda64a84c1504db7454ee4cadbd362eea64e545
|
||||
HARFBUZZ_TARBALL := harfbuzz-12.2.0.tar.xz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
From 6105bad18730fe05916b8b87903333d804ef8b84 Mon Sep 17 00:00:00 2001
|
||||
From: Khaled Hosny <khaled@aliftype.com>
|
||||
Date: Wed, 29 Oct 2025 22:59:51 +0300
|
||||
Subject: [PATCH] Fix applying synthetic slight to glyph origins (#5629)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
* Fix applying synthetic slight to glyph origins
|
||||
|
||||
The hb_font_t::get_glyph_[h/v]_origins() methods were applying all the
|
||||
transformations to the first glyph in the buffer. This shows up for
|
||||
vertical text only because h_origin callback is usually unset.
|
||||
|
||||
Fixes https://github.com/harfbuzz/harfbuzz/issues/5628
|
||||
|
||||
* Don’t apply slant to glyph origin
|
||||
|
||||
Per discussion in https://github.com/harfbuzz/harfbuzz/issues/5628#issuecomment-3459345504
|
||||
|
||||
* Disable only font functions that fail
|
||||
---
|
||||
src/hb-font.hh | 16 ++++++----------
|
||||
test/shape/data/in-house/meson.build | 1 +
|
||||
test/shape/data/in-house/tests/synthetic.tests | 3 +++
|
||||
3 files changed, 10 insertions(+), 10 deletions(-)
|
||||
create mode 100644 test/shape/data/in-house/tests/synthetic.tests
|
||||
|
||||
diff --git a/src/hb-font.hh b/src/hb-font.hh
|
||||
index f7f67af3b..d5626661b 100644
|
||||
--- a/src/hb-font.hh
|
||||
+++ b/src/hb-font.hh
|
||||
@@ -508,9 +508,7 @@ struct hb_font_t
|
||||
hb_position_t y_shift = y_scale < 0 ? -y_strength : y_strength;
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
{
|
||||
- /* Slant */
|
||||
- if (slant_xy)
|
||||
- *first_x += roundf (*first_y * slant_xy);
|
||||
+ /* Slant is ignored as it does not affect glyph origin */
|
||||
|
||||
/* Embolden */
|
||||
if (!embolden_in_place)
|
||||
@@ -518,9 +516,9 @@ struct hb_font_t
|
||||
*first_x += x_shift;
|
||||
*first_y += y_shift;
|
||||
}
|
||||
+ first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride);
|
||||
+ first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride);
|
||||
}
|
||||
- first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride);
|
||||
- first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -548,9 +546,7 @@ struct hb_font_t
|
||||
hb_position_t y_shift = y_scale < 0 ? -y_strength : y_strength;
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
{
|
||||
- /* Slant */
|
||||
- if (slant_xy)
|
||||
- *first_x += roundf (*first_y * slant_xy);
|
||||
+ /* Slant is ignored as it does not affect glyph origin */
|
||||
|
||||
/* Embolden */
|
||||
if (!embolden_in_place)
|
||||
@@ -558,9 +554,9 @@ struct hb_font_t
|
||||
*first_x += x_shift;
|
||||
*first_y += y_shift;
|
||||
}
|
||||
+ first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride);
|
||||
+ first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride);
|
||||
}
|
||||
- first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride);
|
||||
- first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride);
|
||||
}
|
||||
|
||||
return ret;
|
||||
diff --git a/test/shape/data/in-house/meson.build b/test/shape/data/in-house/meson.build
|
||||
index 0da9c1279..a3c87d752 100644
|
||||
--- a/test/shape/data/in-house/meson.build
|
||||
+++ b/test/shape/data/in-house/meson.build
|
||||
@@ -64,6 +64,7 @@ in_house_tests = [
|
||||
'simple.tests',
|
||||
'sinhala.tests',
|
||||
'spaces.tests',
|
||||
+ 'synthetic.tests',
|
||||
'tibetan-contractions-1.tests',
|
||||
'tibetan-contractions-2.tests',
|
||||
'tibetan-vowels.tests',
|
||||
diff --git a/test/shape/data/in-house/tests/synthetic.tests b/test/shape/data/in-house/tests/synthetic.tests
|
||||
new file mode 100644
|
||||
index 000000000..4b11a6a33
|
||||
--- /dev/null
|
||||
+++ b/test/shape/data/in-house/tests/synthetic.tests
|
||||
@@ -0,0 +1,3 @@
|
||||
+@font-funcs-=coretext,ft,directwrite # TODO investigate why these font funcs fail
|
||||
+../fonts/NotoSans-VF.abc.ttf;--font-slant=0.5 --direction=ttb;U+0061,U+0062,U+0063;[gid1=0@-280,-948+0,-1362|gid2=1@-307,-1056+0,-1362|gid3=2@-240,-949+0,-1362]
|
||||
+../fonts/NotoSans-VF.abc.ttf;--font-bold=0.1 --direction=ttb;U+0061,U+0062,U+0063;[gid1=0@-430,-1148+0,-1362|gid2=1@-457,-1256+0,-1362|gid3=2@-390,-1149+0,-1362]
|
||||
--
|
||||
2.39.5
|
||||
|
||||
@@ -17,7 +17,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
|
||||
external/harfbuzz/harfbuzz_visibility.patch.1 \
|
||||
external/harfbuzz/0001-Fix-applying-synthetic-slight-to-glyph-origins-5629.patch.1 \
|
||||
))
|
||||
|
||||
# meson will replace python3 from shebang in build commands with the
|
||||
|
||||
Reference in New Issue
Block a user