Fix diacritics

The big churn is from bumping us to Harfbuzz 6.0.0 (we were on a master from June 2022, 6.0.0 was released December 2022) as it fixes some diacritic positioning with Arabic text.

The main fix, however, comes from marshaling the glyph offsets to Dart (and storing them in C++ which we weren't doing). This is a translation offset within the local space (baseline and advance) of the glyph. It was causing our Arabic diacritics (the "accents" if you will) to be positioned incorrectly.

Prior to the fix:
![image](https://user-images.githubusercontent.com/454182/235834041-a683851a-96b0-4c72-adb9-f68c97682c14.png)

Post fix:
![image](https://user-images.githubusercontent.com/454182/235834074-23db8fab-08be-4529-98b3-f8a04ebe623a.png)

Same word displayed in Google Fonts (confirming correctness, also confirmed by an Arabic reader  on our Discord):
![CleanShot 2023-05-02 at 21 43 33@2x](https://user-images.githubusercontent.com/454182/235834273-9e423c7f-9dc2-48c3-afec-c7f7a9986416.png)

Diffs=
a8c1e3e75 Fix diacritics (#5200)
c7ecbe025 Run clang-format on .glsl files (#5180)
9945a7d2d Merge sbs_render_and_advance into master (#5181)
542e320d2 Discard empty verbs from RawPath (#5166)
This commit is contained in:
luigi-rosso
2023-05-03 21:39:19 +00:00
parent 4c81d5b0f4
commit a989837116
3 changed files with 15 additions and 15 deletions

View File

@ -1 +1 @@
8115f9a079a909777a03f5f211daad206acfa5c6
a8c1e3e758819373ba9246b3731d395f89fa3575

View File

@ -173,18 +173,18 @@ do
harfbuzz .. '/src/hb-ot-meta.cc',
harfbuzz .. '/src/hb-ot-metrics.cc',
harfbuzz .. '/src/hb-ot-name.cc',
harfbuzz .. '/src/hb-ot-shape-complex-arabic.cc',
harfbuzz .. '/src/hb-ot-shape-complex-default.cc',
harfbuzz .. '/src/hb-ot-shape-complex-hangul.cc',
harfbuzz .. '/src/hb-ot-shape-complex-hebrew.cc',
harfbuzz .. '/src/hb-ot-shape-complex-indic-table.cc',
harfbuzz .. '/src/hb-ot-shape-complex-indic.cc',
harfbuzz .. '/src/hb-ot-shape-complex-khmer.cc',
harfbuzz .. '/src/hb-ot-shape-complex-myanmar.cc',
harfbuzz .. '/src/hb-ot-shape-complex-syllabic.cc',
harfbuzz .. '/src/hb-ot-shape-complex-thai.cc',
harfbuzz .. '/src/hb-ot-shape-complex-use.cc',
harfbuzz .. '/src/hb-ot-shape-complex-vowel-constraints.cc',
harfbuzz .. '/src/hb-ot-shaper-arabic.cc',
harfbuzz .. '/src/hb-ot-shaper-default.cc',
harfbuzz .. '/src/hb-ot-shaper-hangul.cc',
harfbuzz .. '/src/hb-ot-shaper-hebrew.cc',
harfbuzz .. '/src/hb-ot-shaper-indic-table.cc',
harfbuzz .. '/src/hb-ot-shaper-indic.cc',
harfbuzz .. '/src/hb-ot-shaper-khmer.cc',
harfbuzz .. '/src/hb-ot-shaper-myanmar.cc',
harfbuzz .. '/src/hb-ot-shaper-syllabic.cc',
harfbuzz .. '/src/hb-ot-shaper-thai.cc',
harfbuzz .. '/src/hb-ot-shaper-use.cc',
harfbuzz .. '/src/hb-ot-shaper-vowel-constraints.cc',
harfbuzz .. '/src/hb-ot-shape-fallback.cc',
harfbuzz .. '/src/hb-ot-shape-normalize.cc',
harfbuzz .. '/src/hb-ot-shape.cc',

View File

@ -59,12 +59,12 @@ function installRiveCpp {
echo "Cloning Harfbuzz."
git clone https://github.com/harfbuzz/harfbuzz
pushd harfbuzz
git checkout 858570b1d9912a1b746ab39fbe62a646c4f7a5b1 .
git checkout "6.0.0" .
popd
fi
if [ $FORCE == "true" ] || [ ! -d SheenBidi ]; then
rm -fR SheenBidi
echo "Cloning Harfbuzz."
echo "Cloning SheenBidi."
git clone https://github.com/Tehreer/SheenBidi.git
pushd SheenBidi
git checkout v2.6 .