[Libreoffice-commits] core.git: vcl/source
Mark Hung (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 19:15:45 UTC 2021
vcl/source/font/fontmetric.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 68c1682929d5b8af95e299a2cfb3fdbb4f97e5ed
Author: Mark Hung <marklh9 at gmail.com>
AuthorDate: Sun May 2 11:38:16 2021 +0800
Commit: Mark Hung <marklh9 at gmail.com>
CommitDate: Mon May 10 21:15:04 2021 +0200
tdf#105650 different strikethrough offset for vertical writing.
Change-Id: I7f1a8753bb00972865625628baeff76ff5dc4699
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115015
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9 at gmail.com>
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index 90873445bca1..817025286b37 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -170,7 +170,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
const vcl::Font& rFont ( pDev->GetFont() );
bool bCJKVertical = MsLangId::isCJK(rFont.GetLanguage()) && rFont.IsVertical();
tools::Long nUnderlineOffset = bCJKVertical ? mnDescent : (mnDescent/2 + 1);
- tools::Long nStrikeoutOffset = -((mnAscent - mnIntLeading) / 3);
+ tools::Long nStrikeoutOffset = rFont.IsVertical() ? -((mnAscent - mnDescent) / 2) : -((mnAscent - mnIntLeading) / 3);
mnUnderlineSize = nLineHeight;
mnUnderlineOffset = nUnderlineOffset - nLineHeight2;
More information about the Libreoffice-commits
mailing list