diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2015-04-28 02:35:37 +0300 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2015-04-29 03:46:07 +0000 |
commit | af424114d0648cead5c05eb70adbed499ffae581 (patch) | |
tree | b3f79ad04086bfbe3801e51455284ca180ae8b21 | |
parent | 78aef6d869878229de3153b70d29bcdbd87062cb (diff) |
tdf#71034: [OS X] Ugly (too heavy) fake bold
Instead of using a hardcoded stroking value, adopt the formula used by
AOO which seems to give better results.
Change-Id: I87d55e1fadccf4521c26cd60458d968fcd8a2386
Reviewed-on: https://gerrit.libreoffice.org/15563
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | vcl/quartz/ctfonts.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index a11453cc6d98..06bccb58992d 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -83,7 +83,7 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) ((mpFontData->GetWeight() < WEIGHT_SEMIBOLD) && (mpFontData->GetWeight() != WEIGHT_DONTKNOW)) ) { - int nStroke = -10.0; + int nStroke = -lrint((3.5F * pReqFont->GetWeight()) / mpFontData->GetWeight()); CFNumberRef rStroke = CFNumberCreate(NULL, kCFNumberSInt32Type, &nStroke); CFDictionarySetValue(mpStyleDict, kCTStrokeWidthAttributeName, rStroke); } |