Skip to content

Commit

Permalink
fontique: Fix fontconfig->opentype extra black weight map
Browse files Browse the repository at this point in the history
OpenType extra black is usually 950, not 1000 (see also
[fontique::Weight::EXTRA_BLACK]).
  • Loading branch information
tomcur authored and xorgy committed Aug 13, 2024
1 parent 6ecf702 commit e856247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fontique/src/backend/fontconfig/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Weight {
(700, 200),
(800, 205),
(900, 210),
(1000, 215),
(950, 215),
];
for (i, (ot, fc)) in MAP.iter().skip(1).enumerate() {
if weight == *fc {
Expand All @@ -58,7 +58,7 @@ impl Weight {
return Self::new(ot_a + (ot_b - ot_a) * t);
}
}
Self::new(1000.0)
Weight::EXTRA_BLACK
}
}

Expand Down

0 comments on commit e856247

Please sign in to comment.