Closed tomcur closed 3 months ago
The fallback is hit only in case the input weight is >=215 (fontconfig's equivalent of extra black), so I think it makes sense to default to EXTRA_BLACK in that case (instead of NORMAL or extrapolating).
I'd be happy to make the change to named weights, but can only pick it up after august 12th as I'm currently on holiday.
We correctly map extra black to 950 in the Weight
type so this change looks good to me. If you’d like to replace the magic numbers with named constants, that seems like a solid improvement.
(That is the sort of small change which can be made my an approver/merger, so we don't need to wait on the PR author here)
OpenType extra black is usually 950. If my understanding is correct, Fontique should map fontconfig's extra black to 950, not 1000.
See also
fontique::Weight::EXTRA_BLACK
https://github.com/linebender/parley/blob/0f2608cc562d7c2eef0f34819aeb15166d542b67/fontique/src/attributes.rs#L211-L212