summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@aliftype.com>2022-12-26 00:25:54 +0200
committerخالد حسني <khaled@aliftype.com>2022-12-26 09:29:57 +0000
commitced8585bcb92aa58ca3e24197ff38fb82cc8a703 (patch)
treef339d701d4a48de66dd4c32f7dd532a2d05f4e32 /svtools
parent1e6e59f874b219d2ff3c8363a69ce7ba6a44bc1c (diff)
tdf#88484: Show sample text for Abyssinica SIL font
The font sets Arabic Presentation Forms-B bit, probably because it includes U+FEFF (Zero Width Space) which happens to be in that block but it isn’t an Arabic code point. Filter this bit out if we already decided it isn’t an Arabic font. Change-Id: I9935c793b8a7592eb92db59bc75de65b81ab99fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144819 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com> (cherry picked from commit 18b39c8c9b35528c8fb172339126b613827d09aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144796
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/sampletext.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index a181fdde238c..abcfde92b7a1 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -1122,6 +1122,12 @@ namespace
aMasked.set(vcl::UnicodeCoverage::GREEK_EXTENDED, false);
aMasked.set(vcl::UnicodeCoverage::GREEK_AND_COPTIC, false);
+ // tdf#88484
+ // Some fonts set the Arabic Presentation Forms-B bit because they
+ // support U+FEFF (Zero Width Space) which happens to be in that block
+ // but it isn’t an Arabic code point. By the time we reach here we
+ // decided this isn’t an Arabic font, so it should be safe.
+ aMasked.set(vcl::UnicodeCoverage::ARABIC_PRESENTATION_FORMS_B, false);
if (aMasked.count() == 1)
return otCoverageToScript(static_cast<UnicodeCoverageEnum>(find_first(aMasked)));