From c87a683fa13514085b3945a25f66a6d6e07ab9f3 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Sat, 12 Oct 2024 15:04:36 +0800 Subject: [PATCH] [11_40] Tune font substitution for roman cjk and Stix cjk --- TeXmacs/fonts/font-substitutions.scm | 11 +++++------ src/Graphics/Fonts/font_database.cpp | 8 +++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/TeXmacs/fonts/font-substitutions.scm b/TeXmacs/fonts/font-substitutions.scm index 377bf3b046..a1cbee68ff 100644 --- a/TeXmacs/fonts/font-substitutions.scm +++ b/TeXmacs/fonts/font-substitutions.scm @@ -1,6 +1,7 @@ ((FandolSong sansserif) (FandolHei)) ((FandolSong typewriter) (FandolFang)) ((FandolSong italic) (FandolKai)) + ((Hiragino\ Mincho\ Pro sansserif) (Hiragino\ Kaku\ Gothic\ Pro)) ((Hiragino\ Mincho\ ProN sansserif) (Hiragino\ Kaku\ Gothic\ ProN)) ((IPAMincho bold) (IPAGothic)) @@ -11,6 +12,7 @@ ((MS\ Mincho sansserif) (MS\ Gothic)) ((Sazanami\ Mincho bold) (Sazanami\ Gothic)) ((Sazanami\ Mincho sansserif) (Sazanami\ Gothic)) + ((SimSun bold) (SimHei)) ((SimSun sansserif) (SimHei)) ((SimSun italic) (KaiTi_GB2312)) @@ -30,12 +32,9 @@ ((UnBatang italic) (UnGraphic)) ((UnBatang typewriter) (UnGungseo)) -((concrete cjk) (FandolSong)) -((concrete cjk) (SimSun)) -((roman cjk) (FandolSong)) -((roman cjk) (SimSun)) -((Stix cjk) (FandolSong)) -((Stix cjk) (SimSun)) +((concrete cjk) (Noto\ CJK\ SC)) +((roman cjk) (Noto\ CJK\ SC)) +((Stix cjk) (Noto\ CJK\ SC)) ((Bodoni\ 72 smallcaps) (Bodoni\ 72\ Smallcaps)) ((Bodoni\ 72\ Oldstyle smallcaps) (Bodoni\ 72\ Smallcaps)) diff --git a/src/Graphics/Fonts/font_database.cpp b/src/Graphics/Fonts/font_database.cpp index 775f5528dd..6f312f1111 100644 --- a/src/Graphics/Fonts/font_database.cpp +++ b/src/Graphics/Fonts/font_database.cpp @@ -286,11 +286,9 @@ font_database_load_substitutions (url u) { is_atomic (t[i][0][0]) && is_atomic (t[i][1][0])) { string key= t[i][0][0]->label; string im = t[i][1][0]->label; - if (N (font_database_styles (im, font_table)) != 0) { - if (!font_substitutions->contains (key)) - font_substitutions (key)= tree (TUPLE); - font_substitutions (key) << t[i]; - } + if (!font_substitutions->contains (key)) + font_substitutions (key)= tree (TUPLE); + font_substitutions (key) << t[i]; } } }