From 407546e7c3f8c732ccf60e5fb3844f6efb86f932 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 23 Jan 2018 15:04:00 +0200 Subject: 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/48409 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- vcl/quartz/ctfonts.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index fbdf2efe89a3..dbe4eb2cb96e 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -392,7 +392,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; -- cgit v1.2.3