diff options
author | Jonathan Clark <jonathan@libreoffice.org> | 2024-10-18 06:12:39 -0600 |
---|---|---|
committer | Jonathan Clark <jonathan@libreoffice.org> | 2024-10-18 21:49:03 +0200 |
commit | 224fae69b224d28a1664c48117e77265ed67a136 (patch) | |
tree | 57e66f932aac2cadcf95804f0d293e38c6597f9d /vcl/source/outdev/font.cxx | |
parent | 3cc367f426506e3165dda06feeb20e0a9b4c6194 (diff) |
tdf#163215: Enable kashida justification for AAT fonts
Currently, we use HarfBuzz-provided kashida insertion position
information to decide on positions to insert kashida. This data is used
both while ranking kashida insertion positions, and to avoid inserting
kashida in positions that would break shaping on a per-font basis.
Unfortunately, HarfBuzz cannot validate kashida insertion positions for
AAT fonts. As a result, kashida were previously not inserted for text
using AAT fonts.
This change updates kashida justification to skip validation against
HarfBuzz when AAT fonts are used.
Change-Id: If0d31512b1db0f1f8155963f9b1031eb01bacc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175165
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Diffstat (limited to 'vcl/source/outdev/font.cxx')
-rw-r--r-- | vcl/source/outdev/font.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index a2f32327f72c..334f6a311eb0 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1227,6 +1227,10 @@ void OutputDevice::GetWordKashidaPositions(const OUString& rText, if (!pSalLayout) return; + // tdf#163215: VCL cannot suggest valid kashida positions for certain fonts (e.g. AAT). + if (!pSalLayout->HasFontKashidaPositions()) + return; + pOutMap->resize(nEnd, false); for (sal_Int32 i = 0; i < nEnd; ++i) { |