diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-01-23 15:04:00 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-01-24 17:27:10 +0100 |
commit | e9a6a9e59a38a77d383dcbe1e289e7e5a6db8554 (patch) | |
tree | 694e0296670e0ac00d1e2a7681d2b58a6e4101b5 | |
parent | e406259319054024f032c0d5b7468136c13b3733 (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/48438
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.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 c31dcc329e2b..ebb7066be9d8 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -397,7 +397,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; |