summaryrefslogtreecommitdiff
path: root/ctex-fontset-pkuthss.def
blob: 2febb6122d512af7b817414730cf2d8f21e68f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\ProvidesExplFile{\ExplFileName}{}{}{}

\sys_if_engine_pdftex:TF
  {
    \ctex_zhmap_case:nnn
      {
        \ctex_punct_set:n { windows }
        \setCJKmainfont
          [ BoldFont = simhei.ttf , ItalicFont = simkai.ttf ] { simsun.ttc }
        \setCJKsansfont { simhei.ttf }
        \setCJKmonofont { simfang.ttf }
        \setCJKfamilyfont { zhkai }  { simkai.ttf }
        \setCJKfamilyfont { zhfs }   { simfang.ttf }
        \setCJKfamilyfont { zhsong } { simsun.ttc }
        \setCJKfamilyfont { zhhei }  { simhei.ttf }
        %\setCJKfamilyfont { zhli }   { simli.ttf }
        %\setCJKfamilyfont { zhyou }  { simyou.ttf }
        \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
        \ctex_punct_map_family:nn { \CJKsfdefault } { zhhei }
        \ctex_punct_map_family:nn { \CJKttdefault } { zhfs }
        \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
        \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei }
      }
      {
        \ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { zhwindowsfonts }
        \ctex_punct_set:n { windows }
        \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong }
        \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei }
        \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai }
      }
      {
        \tl_set:Nn \CJKrmdefault { rm }
        \tl_set:Nn \CJKsfdefault { sf }
        \tl_set:Nn \CJKttdefault { tt }
      }
  }
  {
    \setCJKmainfont
      [ BoldFont = SimHei , ItalicFont = [ simkai.ttf ] ] { SimSun }
    \setCJKsansfont { SimHei }
    \setCJKmonofont { [ simfang.ttf ] }
    \setCJKfamilyfont { zhsong }  { SimSun }
    \setCJKfamilyfont { zhhei }   { SimHei }
    \setCJKfamilyfont { zhkai }   { [ simkai.ttf ] }
    \setCJKfamilyfont { zhfs }    { [ simfang.ttf ] }
    %\setCJKfamilyfont { zhli }    { LiSu }
    %\setCJKfamilyfont { zhyou }   { YouYuan }
  }

\NewDocumentCommand \songti   { } { \CJKfamily { zhsong } }
\NewDocumentCommand \heiti    { } { \CJKfamily { zhhei } }
\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } }
\NewDocumentCommand \kaishu   { } { \CJKfamily { zhkai } }
%\NewDocumentCommand \lishu    { } { \CJKfamily { zhli } }
%\NewDocumentCommand \youyuan  { } { \CJKfamily { zhyou } }

\endinput
% vim:ft=tex:ts=2:sw=2:et