Debian Codegraph @

texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def

raw
1 %%
2 %% This is file `ctex-fontset-fandol.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ctex.dtx (with options: `fontset,fandol')
8 %%
9 %% Copyright (C) 2003--2022
10 %% CTEX.ORG and any individual authors listed in the documentation.
11 %% ---------------------------------------------------------------------
12 %%
13 %% This work may be distributed and/or modified under the
14 %% conditions of the LaTeX Project Public License, either
15 %% version 1.3c of this license or (at your option) any later
16 %% version. This version of this license is in
17 %% http://www.latex-project.org/lppl/lppl-1-3c.txt
18 %% and the latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.3 or later is part of all distributions of
21 %% LaTeX version 2005/12/01 or later.
22 %%
23 %% This work has the LPPL maintenance status "maintained".
24 %%
25 %% ---------------------------------------------------------------------
26 %%
27 \GetIdInfo$Id: ctex.dtx 13a2256 2022-07-14 18:54:09 +0800 Qing Lee <[email protected]> $
28 {Fandol fonts definition (CTEX)}
29 \ProvidesExplFile{ctex-fontset-fandol.def}
30 {\ExplFileDate}{2.5.10}{\ExplFileDescription}
31 \ctex_fontset_case:nnnn
32 { \ctex_fontset_error:n { fandol } }
33 {
34 \ctex_zhmap_case:nnn
35 {
36 \setCJKmainfont { FandolSong-Regular.otf }
37 [
38 cmap = UniGB-UTF16-H,
39 BoldFont = FandolSong-Bold.otf,
40 ItalicFont = FandolKai-Regular.otf
41 ]
42 \setCJKsansfont { FandolHei-Regular.otf }
43 [ cmap = UniGB-UTF16-H, BoldFont = FandolHei-Bold.otf ]
44 \setCJKmonofont { FandolFang-Regular.otf }
45 [ cmap = UniGB-UTF16-H ]
46 \setCJKfamilyfont { zhsong } { FandolSong-Regular.otf }
47 [ cmap = UniGB-UTF16-H, BoldFont = FandolSong-Bold.otf ]
48 \setCJKfamilyfont { zhhei } { FandolHei-Regular.otf }
49 [ cmap = UniGB-UTF16-H, BoldFont = FandolHei-Bold.otf ]
50 \setCJKfamilyfont { zhfs } { FandolFang-Regular.otf }
51 [ cmap = UniGB-UTF16-H ]
52 \setCJKfamilyfont { zhkai } { FandolKai-Regular.otf }
53 [ cmap = UniGB-UTF16-H ]
54 \ctex_punct_set:n { fandol }
55 \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
56 \ctex_punct_map_family:nn { \CJKsfdefault } { zhhei }
57 \ctex_punct_map_family:nn { \CJKttdefault } { zhfs }
58 \ctex_punct_map_bfseries:nn { \CJKrmdefault, zhsong } { zhsongb }
59 \ctex_punct_map_bfseries:nn { \CJKsfdefault, zhhei } { zhheib }
60 \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
61 }
62 {
63 \ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { fandol }
64 \ctex_punct_set:n { fandol }
65 \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
66 \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei }
67 \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
68 }
69 { \ctex_fontset_error:n { fandol } }
70 }
71 {
72 \ctex_set_upfonts:nnnnnn
73 { FandolSong-Regular.otf }
74 { FandolSong-Bold.otf }
75 { FandolKai-Regular.otf }
76 { FandolHei-Regular.otf }
77 { FandolHei-Bold.otf }
78 { FandolFang-Regular.otf }
79 \ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb }
80 \ctex_set_upfamily:nnn { zhhei } { upzhsans } { upzhsansb }
81 \ctex_set_upfamily:nnn { zhfs } { upzhmono } {}
82 \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
83 }
84 {
85 \setCJKmainfont { FandolSong-Regular }
86 [
87 Extension = .otf,
88 BoldFont = FandolSong-Bold,
89 ItalicFont = FandolKai-Regular
90 ]
91 \setCJKsansfont { FandolHei-Regular }
92 [ Extension = .otf, BoldFont = FandolHei-Bold ]
93 \setCJKmonofont { FandolFang-Regular }
94 [ Extension = .otf ]
95 \setCJKfamilyfont { zhsong } { FandolSong-Regular }
96 [ Extension = .otf, BoldFont = FandolSong-Bold ]
97 \setCJKfamilyfont { zhhei } { FandolHei-Regular }
98 [ Extension = .otf, BoldFont = FandolHei-Bold ]
99 \setCJKfamilyfont { zhfs } { FandolFang-Regular }
100 [ Extension = .otf ]
101 \setCJKfamilyfont { zhkai } { FandolKai-Regular }
102 [ Extension = .otf ]
103 }
104 \NewDocumentCommand \songti { } { \CJKfamily { zhsong } }
105 \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } }
106 \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } }
107 \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } }
108 %%
109 %%
110 %% End of file `ctex-fontset-fandol.def'.