Kaydet (Commit) 3e1dbbe2 authored tarafından Khaled Hosny's avatar Khaled Hosny Kaydeden (comit) Adolfo Jayme Barrientos

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/15553Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
üst 6f644608
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment