From b0e2617c91a5b8ec7a593bb7703b34193d5d662d Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 9 Dec 2024 18:46:26 +0700 Subject: [PATCH] Update fontique/src/attributes.rs Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> --- fontique/src/attributes.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/fontique/src/attributes.rs b/fontique/src/attributes.rs index 1e9a4ccf..d57768e5 100644 --- a/fontique/src/attributes.rs +++ b/fontique/src/attributes.rs @@ -354,6 +354,7 @@ impl FontWeight { if weight == *fc { return Self::new(*ot as f32); } + // Linear interpolation if not an exact match if weight < *fc { let weight = weight as f32; let fc_a = MAP[i - 1].1 as f32;