| 1 |
%% |
| 2 |
%% This is file `ctex-fontset-macnew.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% ctex.dtx (with options: `fontset,macnew') |
| 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 |
{macOS fonts definition for El Capitan or later version (CTEX)} |
| 29 |
\ProvidesExplFile{ctex-fontset-macnew.def} |
| 30 |
{\ExplFileDate}{2.5.10}{\ExplFileDescription} |
| 31 |
\ctex_fontset_case:nnnn |
| 32 |
{ \ctex_fontset_error:n { mac } } |
| 33 |
{ |
| 34 |
\ctex_zhmap_case:nnn |
| 35 |
{ |
| 36 |
\setCJKmainfont { :3:Songti.ttc } |
| 37 |
[ |
| 38 |
BoldFont = :1:Songti.ttc, |
| 39 |
ItalicFont = :0:Kaiti.ttc, |
| 40 |
BoldItalicFont = :3:Kaiti.ttc, |
| 41 |
] |
| 42 |
\setCJKsansfont { :2:PingFang.ttc } [ BoldFont = :8:PingFang.ttc ] |
| 43 |
\setCJKmonofont { STFANGSO.ttf } |
| 44 |
\setCJKfamilyfont { zhsong } { :3:Songti.ttc } [ BoldFont = :1:Songti.ttc ] |
| 45 |
\setCJKfamilyfont { zhhei } { :2:PingFang.ttc } [ BoldFont = :8:PingFang.ttc ] |
| 46 |
\setCJKfamilyfont { zhkai } { :0:Kaiti.ttc } [ BoldFont = :3:Kaiti.ttc ] |
| 47 |
\setCJKfamilyfont { zhfs } { STFANGSO.ttf } |
| 48 |
\setCJKfamilyfont { zhli } { :0:Baoli.ttc } |
| 49 |
\setCJKfamilyfont { zhyou } { :4:Yuanti.ttc } [ BoldFont = :0:Yuanti.ttc ] |
| 50 |
\ctex_punct_set:n { mac } |
| 51 |
\ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } |
| 52 |
\ctex_punct_map_family:nn { \CJKsfdefault } { zhpf } |
| 53 |
\ctex_punct_map_family:nn { \CJKttdefault } { zhfs } |
| 54 |
\ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } |
| 55 |
\ctex_punct_map_bfseries:nn { \CJKrmdefault, zhsong } { zhsongb } |
| 56 |
\ctex_punct_map_bfseries:nn { \CJKsfdefault, zhhei } { zhpfb } |
| 57 |
\ctex_punct_map_bfseries:nn { zhyou } { zhyoub } |
| 58 |
} |
| 59 |
{ |
| 60 |
\ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { mac } |
| 61 |
\ctex_punct_set:n { mac } |
| 62 |
\ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } |
| 63 |
\ctex_punct_map_family:nn { \CJKsfdefault } { zhpf } |
| 64 |
\ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhpf } |
| 65 |
\ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } |
| 66 |
} |
| 67 |
{ \ctex_fontset_error:n { macnew } } |
| 68 |
} |
| 69 |
{ |
| 70 |
\ctex_set_upmap:nnn { upserif } { :3:Songti.ttc } { :1:Songti.ttc } |
| 71 |
\ctex_set_upmap:nnn { upserifit } { :0:Kaiti.ttc } { } |
| 72 |
\ctex_set_upmap:nnn { upstsl } { :0:Baoli.ttc } { } |
| 73 |
\ctex_set_upmap:nnn { upstht } { :4:Yuanti.ttc } { } |
| 74 |
\ctex_set_upmap_unicode:nnn { upsans } { :2:PingFang.ttc } { :8:PingFang.ttc } |
| 75 |
\ctex_set_upmap_unicode:nnn { upmono } { STFANGSO.ttf } { } |
| 76 |
\ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb } |
| 77 |
\ctex_set_upfamily:nnn { zhhei } { upzhsans } { upzhsansb } |
| 78 |
\ctex_set_upfamily:nnn { zhfs } { upzhmono } { } |
| 79 |
\ctex_set_upfamily:nnn { zhkai } { upzhserifit } { } |
| 80 |
\ctex_set_upfamily:nnn { zhli } { upschrm } { } |
| 81 |
\ctex_set_upfamily:nnn { zhyou } { upschgt } { } |
| 82 |
} |
| 83 |
{ |
| 84 |
\setCJKmainfont { Songti~SC~Light } |
| 85 |
[ |
| 86 |
BoldFont = Songti~SC~Bold, |
| 87 |
ItalicFont = Kaiti~SC, |
| 88 |
BoldItalicFont = Kaiti~SC~Bold |
| 89 |
] |
| 90 |
\setCJKsansfont { PingFang~SC } |
| 91 |
\setCJKmonofont { STFangsong } |
| 92 |
\setCJKfamilyfont { zhsong } { Songti~SC~Light } [ BoldFont = Songti~SC~Bold ] |
| 93 |
\setCJKfamilyfont { zhhei } { Heiti~SC~Light } [ BoldFont = Heiti~SC~Medium ] |
| 94 |
\setCJKfamilyfont { zhpf } { PingFang~SC } |
| 95 |
\setCJKfamilyfont { zhfs } { STFangsong } |
| 96 |
\setCJKfamilyfont { zhkai } { Kaiti~SC } [ BoldFont = Kaiti~SC~Bold ] |
| 97 |
\setCJKfamilyfont { zhli } { Baoli~SC } |
| 98 |
\setCJKfamilyfont { zhyou } { Yuanti~SC~Light } [ BoldFont = Yuanti~SC~Regular ] |
| 99 |
} |
| 100 |
\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } |
| 101 |
\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } |
| 102 |
\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } |
| 103 |
\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } |
| 104 |
\NewDocumentCommand \lishu { } { \CJKfamily { zhli } } |
| 105 |
\NewDocumentCommand \youyuan { } { \CJKfamily { zhyou } } |
| 106 |
\bool_lazy_or:nnTF |
| 107 |
{ \sys_if_engine_pdftex_p: } |
| 108 |
{ \sys_if_engine_uptex_p: } |
| 109 |
{ |
| 110 |
\cs_new_eq:NN \yahei \heiti |
| 111 |
\cs_new_eq:NN \pingfang \heiti |
| 112 |
} |
| 113 |
{ |
| 114 |
\NewDocumentCommand \yahei { } { \CJKfamily { zhpf } } |
| 115 |
\NewDocumentCommand \pingfang { } { \CJKfamily { zhpf } } |
| 116 |
} |
| 117 |
%% |
| 118 |
%% |
| 119 |
%% End of file `ctex-fontset-macnew.def'. |