summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-06 11:10:45 +0300
committerخالد حسني <khaled@libreoffice.org>2023-07-06 14:25:56 +0200
commitf348425e0b9187f56370d9b76594872f935b4d8e (patch)
tree772cc6beb6b4fd833dd214c9a012e85b35d69c30 /i18npool
parenta0ab053c9f7645ff10a1ab69858a30bb3bb4857c (diff)
tdf#52577: Classify superscript numbers in Latin-1 block as ScriptType::WEAK
So that they inherit the script from the surrounding text like the rest if superscripts and subscripts. Change-Id: Ib5c19f84b080eca0f24009a4e6dd2dd4019441d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154094 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 2b56d2726303..444fce619e0c 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -526,6 +526,9 @@ bool getCompatibilityScriptClassByBlock(sal_uInt32 currentChar, sal_Int16 &rScri
// Few Spacing Modifier Letters that can be Bopomofo tonal marks.
else if ( 0x2CA == currentChar || 0x2CB == currentChar || 0x2C7 == currentChar || 0x2D9 == currentChar )
rScriptType = ScriptType::WEAK;
+ // tdf#52577 superscript numbers should be we weak.
+ else if ( 0xB2 == currentChar || 0xB3 == currentChar || 0xB9 == currentChar )
+ rScriptType = ScriptType::WEAK;
// workaround for Coptic
else if ( 0x2C80 <= currentChar && 0x2CE3 >= currentChar)
rScriptType = ScriptType::LATIN;