summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/CommonSalLayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/CommonSalLayout.cxx')
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 06b815f56be6..7ef1fac1286f 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -305,7 +305,7 @@ namespace vcl {
#include "VerticalOrientationData.cxx"
- VerticalOrientation GetVerticalOrientation(sal_UCS4 cCh)
+ VerticalOrientation GetVerticalOrientation(sal_UCS4 cCh, const LanguageTag& rTag)
{
uint8_t nRet = 1;
@@ -313,6 +313,9 @@ namespace vcl {
{
nRet = sVerticalOrientationValues[sVerticalOrientationPages[0][cCh >> kVerticalOrientationCharBits]]
[cCh & ((1 << kVerticalOrientationCharBits) - 1)];
+ // Override fullwidth colon and semi-colon orientation. Tu is preferred.
+ if ((cCh == 0xff1a || cCh == 0xff1b) && rTag.getLanguage() == "zh")
+ nRet = 2;
}
else if (cCh < (kVerticalOrientationMaxPlane + 1) * 0x10000)
{
@@ -505,7 +508,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
{
sal_Int32 nPrevIdx = nIdx;
sal_UCS4 aChar = rArgs.mrStr.iterateCodePoints(&nIdx);
- VerticalOrientation aVo = vcl::GetVerticalOrientation(aChar);
+ VerticalOrientation aVo = vcl::GetVerticalOrientation(aChar, rArgs.maLanguageTag);
sal_UCS4 aVariationSelector = 0;
if (nIdx < nEndRunPos)