[Libreoffice-commits] core.git: vcl/quartz
Khaled Hosny
khaledhosny at eglug.org
Tue Apr 28 09:36:55 PDT 2015
vcl/quartz/ctfonts.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3e1dbbe21ddd9b40fde12da6cb680e91aa0a4e54
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Tue Apr 28 02:35:37 2015 +0300
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/15553
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 02db1af..700c0e1 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -80,7 +80,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);
}
More information about the Libreoffice-commits
mailing list