diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-07-08 12:57:32 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-07-08 18:59:50 +0200 |
commit | f1998c01bf0a85481201589ffbd8b0df400491ee (patch) | |
tree | 356f7e6de39775381f289846031e7153b818eb25 | |
parent | 3e0b956cfff8d8aedc86d5e29b711b3f420f53c8 (diff) |
tdf137553: Fix advance width for text using Graphite fonts
This is a HarfBuzz bug and it was reported upstream.
Change-Id: Ibf945d30f57c7fb847b63c40f5a7b2903958ab89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154213
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
-rw-r--r-- | external/harfbuzz/UnpackedTarball_harfbuzz.mk | 2 | ||||
-rw-r--r-- | external/harfbuzz/tdf137553.patch.1 | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 9bc9e326b426..b2e1f5145dc7 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -15,7 +15,9 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,harfbuzz)) $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) +# https://github.com/harfbuzz/harfbuzz/pull/4314 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ + external/harfbuzz/tdf137553.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/harfbuzz/tdf137553.patch.1 b/external/harfbuzz/tdf137553.patch.1 new file mode 100644 index 000000000000..807001e497b2 --- /dev/null +++ b/external/harfbuzz/tdf137553.patch.1 @@ -0,0 +1,16 @@ +diff -ur harfbuzz.org/src/hb-graphite2.cc harfbuzz/src/hb-graphite2.cc +--- harfbuzz.org/src/hb-graphite2.cc 2023-07-08 12:33:00 ++++ harfbuzz/src/hb-graphite2.cc 2023-07-08 12:37:46 +@@ -363,9 +363,10 @@ + } + else + { ++ auto origin_X = gr_slot_origin_X (is) * xscale; + c->advance = 0; +- clusters[ci].advance += gr_slot_origin_X(is) * xscale - curradv; +- curradv += clusters[ci].advance; ++ clusters[ci].advance += origin_X - curradv; ++ curradv = origin_X; + } + ci++; + } |