[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differe
From: |
Nikolaus Waxweiler |
Subject: |
Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts? |
Date: |
Tue, 18 Dec 2018 21:57:22 +0000 |
I inserted some debug printfs into the locations Alexei pointed out
and indeed the only difference after a-/descender calculations are
done was that ascender values differ, 983 fU for the static, 739 fU
for the instances. Height stays 1200 fU like in my calculation, bbox
yMin/yMax stay the same.
Looking at the code, this is an unfortunate corner case it seems.
`sfnt_load_face` by default assigns the hhea metrics to ascender,
descender and height and only if they are zero does it look at typo
and then win. When applying MVAR, it blindly assigns whatever ends up
in the typo metrics, and if zero, in the win metrics. The default
outline and the instances therefore have different decisions made
about their metrics.
> I would say if that bit is off then the respective MVAR tags should be
> applied to hhea values.
Cantarell doesn't have a typo/win delta in the MVAR :/
The attached diff solves the issue for me by simply not varying ascent
and descent unless USE_TYPO_METRICS is set, but I'm not sure this has
unintended consequences like never looking at modified win metrics?
ft.patch
Description: Text Data
- [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/17
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/18
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Behdad Esfahbod, 2018/12/18
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?,
Nikolaus Waxweiler <=
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/18
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Werner LEMBERG, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Behdad Esfahbod, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Behdad Esfahbod, 2018/12/20
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/22
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Behdad Esfahbod, 2018/12/22
- Re: [ft-devel] Variable fonts: hhea/typo/win metrics interpreted differently for instances compared to static fonts?, Nikolaus Waxweiler, 2018/12/22