diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/font/fontmetric.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index cd23756f0f97..cd0b9f8557e9 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -282,7 +282,9 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev ) if ( !n2LineDY2 ) n2LineDY2 = 1; - long nUnderlineOffset = mnDescent/2 + 1; + const vcl::Font& rFont ( pDev->GetFont() ); + bool bCJKVertical = MsLangId::isCJK(rFont.GetLanguage()) && rFont.IsVertical(); + long nUnderlineOffset = bCJKVertical ? mnDescent : (mnDescent/2 + 1); long nStrikeoutOffset = -((mnAscent - mnIntLeading) / 3); mnUnderlineSize = nLineHeight; @@ -306,6 +308,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev ) else mnWUnderlineSize = ((nWCalcSize*50)+50) / 100; + // Don't assume that wavelines are never placed below the descent, because for most fonts the waveline // is drawn into the text mnWUnderlineOffset = nUnderlineOffset; |