Skip to content

Commit

Permalink
[11_40] Tune font substitution for roman cjk and Stix cjk
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 12, 2024
1 parent 01b6600 commit c87a683
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 5 additions & 6 deletions TeXmacs/fonts/font-substitutions.scm
Original file line number Diff line number Diff line change
@@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand Down
8 changes: 3 additions & 5 deletions src/Graphics/Fonts/font_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
}
Expand Down

0 comments on commit c87a683

Please sign in to comment.