%%
%% This is file `ctex-fontset-hanyi.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ctex-fontset.dtx  (with options: `fontset,hanyi')
%% -----------------------------------------------------------------------
%%   Copyright (C) 2003--2026                                            *
%%   CTEX.ORG and any individual authors listed elsewhere in this file.  *
%% -----------------------------------------------------------------------
%%   This work may be distributed and/or modified under the conditions   *
%%   of the LaTeX Project Public License (LPPL), either version 1.3c of  *
%%   this license or (at your option) any later version.                 *
%%   The latest version of this license is in                            *
%%                                                                       *
%%       http://www.latex-project.org/lppl.txt                           *
%%                                                                       *
%%   and version 1.3c or later is part of all distributions of LaTeX     *
%%   version 2008 or later.                                              *
%%                                                                       *
%%   This work has the LPPL maintenance status `maintained'.             *
%% -----------------------------------------------------------------------
\GetIdInfo $Id: ctex-fontset.dtx 2.6.4 2026-07-22 17:12:58 +0800 392183cf Liam <liamhuang0205@gmail.com>$
  {Hanyi fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-hanyi.def}
  {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\ctex_fontset_case:nnn
  {
    \ctex_zhmap_case:nnn
      {
        \setCJKmainfont { HYShuSongErS.ttf }
          [ BoldFont = HYZhongSongS.ttf, ItalicFont = HYKaiTiS.ttf ]
        \setCJKsansfont { HYZhongHeiS.ttf  } [ BoldFont = HYDaHeiS.ttf ]
        \setCJKmonofont { HYFangSongS.ttf  }
        \setCJKfamilyfont { zhsong } { HYShuSongErS.ttf }
          [ BoldFont = HYZhongSongS.ttf ]
        \setCJKfamilyfont { zhhei  } { HYZhongHeiS.ttf  }
          [ BoldFont = HYDaHeiS.ttf     ]
        \setCJKfamilyfont { zhkai  } { HYKaiTiS.ttf     }
        \setCJKfamilyfont { zhfs   } { HYFangSongS.ttf  }
        \ctex_punct_set:n { hanyi }
        \ctex_punct_map_family:nn   { \CJKrmdefault         } { zhsong  }
        \ctex_punct_map_family:nn   { \CJKsfdefault         } { zhhei   }
        \ctex_punct_map_family:nn   { \CJKttdefault         } { zhfs    }
        \ctex_punct_map_bfseries:nn { \CJKrmdefault, zhsong } { zhsongb }
        \ctex_punct_map_bfseries:nn { \CJKsfdefault, zhhei  } { zhheib  }
        \ctex_punct_map_itshape:nn  { \CJKrmdefault         } { zhkai   }
      }
      {
        \ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { hanyi }
        \ctex_punct_set:n { hanyi }
        \ctex_punct_map_family:nn   { \CJKrmdefault } { zhsong }
        \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei  }
        \ctex_punct_map_itshape:nn  { \CJKrmdefault } { zhkai  }
      }
      { \ctex_fontset_error:n { hanyi } }
  }
  {
    \ctex_set_upfonts:nnnnnn
      { HYShuSongErS.ttf }
      { HYZhongSongS.ttf }
      { HYKaiTiS.ttf     }
      { HYZhongHeiS.ttf  }
      { HYDaHeiS.ttf     }
      { HYFangSongS.ttf  }
    \ctex_set_upfamily:nnn { zhsong } { upzhserif   } { upzhserifb }
    \ctex_set_upfamily:nnn { zhhei  } { upzhsans    } { upzhsansb  }
    \ctex_set_upfamily:nnn { zhfs   } { upzhmono    } {}
    \ctex_set_upfamily:nnn { zhkai  } { upzhserifit } {}
  }
  {
    \setCJKmainfont { HYShuSongEr~S }
      [ BoldFont = HYZhongSong~S, ItalicFont = HYKaiTi~S ]
    \setCJKsansfont { HYZhongHei~S  } [ BoldFont = HYDaHei~S ]
    \setCJKmonofont { HYFangSong~S  }
    \setCJKfamilyfont { zhsong } { HYShuSongEr~S }
      [ BoldFont = HYZhongSong~S ]
    \setCJKfamilyfont { zhhei  } { HYZhongHei~S  }
      [ BoldFont = HYDaHei~S     ]
    \setCJKfamilyfont { zhkai  } { HYKaiTi~S     }
    \setCJKfamilyfont { zhfs   } { HYFangSong~S  }
  }
\NewDocumentCommand \songti   { } { \CJKfamily { zhsong  } }
\NewDocumentCommand \heiti    { } { \CJKfamily { zhhei   } }
\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs    } }
\NewDocumentCommand \kaishu   { } { \CJKfamily { zhkai   } }
%% 
%%
%% End of file `ctex-fontset-hanyi.def'.
