summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-01-23 15:04:00 +0200
committerAndras Timar <andras.timar@collabora.com>2018-02-06 15:27:34 +0100
commit64f60cacd6b8ac0b091f1207e806887dc44def19 (patch)
tree01099d0303ac9fee1b94afed0204fabefef54f96
parentaabfbe990de0097836d20ef2efa74e747a247007 (diff)
tdf#69254: Tweak mapping from CoreText weight to our FontWeight a bit
Make the mapping of light weights more likely to hit different enum values for slightly different weights. We want to be able to distinguish between for instance Overpass Light (with weight -0.4) and Overpass ExtraLight (with weight -0.5). Change-Id: If83fbce68149b267a49ef9bcb6624d8790de7c56 Reviewed-on: https://gerrit.libreoffice.org/48426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 3aeda82b09253d20d234d50b39e76977031f2102) Signed-off-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 1476d4a10723c20f1cf1be3b6746c891ca21adf8)
-rw-r--r--vcl/quartz/ctfonts.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index dd64b7a0c5a8..0a018fd460f1 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -420,7 +420,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont
}
else if( fWeight < 0 )
{
- nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - WEIGHT_THIN)/0.9));
+ nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - WEIGHT_THIN)/0.8));
if( nInt < WEIGHT_THIN )
{
nInt = WEIGHT_THIN;