Kaydet (Commit) 407546e7 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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/48409Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
üst e3ee0653
......@@ -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;
......
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