summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>2024-03-06 01:43:57 +0800
committerGitHub <noreply@github.com>2024-03-05 17:43:57 +0000
commit5b2ffd9dd0612d391326e2dd5b5a4a026dec80eb (patch)
tree536e334a769c0f5846fd7b01a6ec07aaac3aafe0
parent824859108bda5e9eca2d67f5519cdd60fe382e6a (diff)
Fix metrics of fandol fonts (#3554)
-rw-r--r--crates/typst/src/text/font/exceptions.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/typst/src/text/font/exceptions.rs b/crates/typst/src/text/font/exceptions.rs
index d1bc7060..2e5e3eda 100644
--- a/crates/typst/src/text/font/exceptions.rs
+++ b/crates/typst/src/text/font/exceptions.rs
@@ -48,6 +48,12 @@ static EXCEPTION_MAP: phf::Map<&'static str, Exception> = phf::phf_map! {
// See https://corefonts.sourceforge.net/.
"Arial-Black" => Exception::new()
.weight(900),
+ // Fandol fonts designed for Chinese typesetting.
+ // See https://ctan.org/tex-archive/fonts/fandol/.
+ "FandolHei-Bold" => Exception::new()
+ .weight(700),
+ "FandolSong-Bold" => Exception::new()
+ .weight(700),
// Noto fonts
"NotoNaskhArabicUISemi-Bold" => Exception::new()
.family("Noto Naskh Arabic UI")