From 5c71ad7fe733664d5dcec1a36dcbf205b203d86c Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Sun, 14 Jul 2024 11:53:32 +0200 Subject: [PATCH] Do not conflate Archivo Narrow and Archivo (Black) fonts (#4478) --- crates/typst/src/text/font/exceptions.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/typst/src/text/font/exceptions.rs b/crates/typst/src/text/font/exceptions.rs index 2e5e3edaf..642b6ea72 100644 --- a/crates/typst/src/text/font/exceptions.rs +++ b/crates/typst/src/text/font/exceptions.rs @@ -48,6 +48,16 @@ static EXCEPTION_MAP: phf::Map<&'static str, Exception> = phf::phf_map! { // See https://corefonts.sourceforge.net/. "Arial-Black" => Exception::new() .weight(900), + // Archivo Narrow is different from Archivo and Archivo Black. Since Archivo Black seems + // identical to Archivo weight 900, only differentiate between Archivo and Archivo Narrow. + "ArchivoNarrow-Regular" => Exception::new() + .family("Archivo Narrow"), + "ArchivoNarrow-Italic" => Exception::new() + .family("Archivo Narrow"), + "ArchivoNarrow-Bold" => Exception::new() + .family("Archivo Narrow"), + "ArchivoNarrow-BoldItalic" => Exception::new() + .family("Archivo Narrow"), // Fandol fonts designed for Chinese typesetting. // See https://ctan.org/tex-archive/fonts/fandol/. "FandolHei-Bold" => Exception::new()