%%
%% This is file `ctex-fontset-lxgw.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lxgw.dtx  (with options: `fontset')
%% -----------------------------------------------------------------------
%%   Runtime: Copyright (C) 2025-2026 by Mingyu Xia <myhsia@outlook.com> *
%%                                                                       *
%%   Fonts:   Copyright (C) 2021-2026 by LXGW <https://github.com/lxgw>  *
%% -----------------------------------------------------------------------
%%   This work may be distributed and/or modified under the conditions   *
%%   of the SIL Open Font License (OFL) version 1.1.                     *
%%   The latest version of this license is in                            *
%%                                                                       *
%%       https://openfontlicense.org                                     *
%%                                                                       *
%%   This work has the OFL maintenance status `maintained'.              *
%%                                                                       *
%%   The Current Maintainer of this work on CTAN is Mingyu Xia.          *
%%                                                                       *
%%   The Current Designer of this font family is LXGW.                   *
%% -----------------------------------------------------------------------
\ProvidesExplFile {ctex-fontset-lxgw.def} {2026-01-01} {v1.521J}
  {lxgw fontset configuration for ctex-kit}
\ctex_fontset_case:nnnn
  { \ctex_fontset_error:n { lxgw } }
  {
    \ctex_file_input:n { ctexpunct-lxgw.spa }
    \ctex_zhmap_case:nnn
      {
        \setCJKmainfont { LXGWWenKaiLite-Regular.ttf   }
          [
            cmap           = UniGB-UTF16-H,
            BoldFont       = LXGWZhenKaiGB-Regular.ttf,
            ItalicFont     = LXGWYozai-Regular.ttf,
            BoldItalicFont = LXGWYozai-Medium.ttf
          ]
        \setCJKsansfont { LXGWMarkerGothic-Regular.ttf }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKmonofont { LXGWXiaolai-Regular.ttf      }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhsong } { LXGWWenKaiLite-Regular.ttf   }
          [ cmap = UniGB-UTF16-H, BoldFont = LXGWZhenKaiGB-Regular.ttf ]
        \setCJKfamilyfont { zhhei  } { LXGWMarkerGothic-Regular.ttf }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhfs   } { LXGWXiaolai-Regular.ttf      }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhkai  } { LXGWYozai-Regular.ttf        }
          [ cmap = UniGB-UTF16-H, BoldFont = LXGWYozai-Medium.ttf ]
        \ctex_punct_set:n { lxgw }
        \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 } { lxgw }
        \ctex_punct_set:n { lxgw }
        \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 { lxgw } }
  }
  {
    \ctex_set_upfonts:nnnnnn
      { LXGWWenKaiLite-Regular.ttf   }
      { LXGWZhenKaiGB-Regular.ttf    }
      { LXGWYozai-Regular.ttf        }
      { LXGWMarkerGothic-Regular.ttf }
      { LXGWMarkerGothic-Regular.ttf }
      { LXGWXiaolai-Regular.ttf      }
    \ctex_set_upfamily:nnn { zhsong } { upzhserif    } { upzhserifb }
    \ctex_set_upfamily:nnn { zhhei  } { upzhsans     } { upzhsans   }
    \ctex_set_upfamily:nnn { zhfs   } { upzhmono     } { }
    \ctex_set_upfamily:nnn { zhkai  } { upzhserifit  } { }
  }
  {
    \setCJKmainfont { LXGWWenKaiLite-Regular   }
      [
        Extension      = .ttf,
        BoldFont       = LXGWZhenKaiGB-Regular,
        ItalicFont     = LXGWYozai-Regular,
        BoldItalicFont = LXGWYozai-Medium.ttf
      ]
    \setCJKsansfont { LXGWMarkerGothic-Regular }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKmonofont { LXGWXiaolai-Regular      }
      [ Extension = .ttf, AutoFakeBold  ]
    \setCJKfamilyfont { zhsong } { LXGWWenKaiLite-Regular   }
      [ Extension = .ttf, BoldFont = LXGWZhenKaiGB-Regular ]
    \setCJKfamilyfont { zhhei  } { LXGWMarkerGothic-Regular }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKfamilyfont { zhfs   } { LXGWXiaolai-Regular      }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKfamilyfont { zhkai  } { LXGWYozai-Regular        }
      [ Extension = .ttf, BoldFont = LXGWYozai-Medium ]
  }
\NewDocumentCommand \songti   { } { \CJKfamily { zhsong } }
\NewDocumentCommand \heiti    { } { \CJKfamily { zhhei  } }
\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs   } }
\NewDocumentCommand \kaishu   { } { \CJKfamily { zhkai  } }
%% -----------------------------------------------------------------------
%%   This work consists of the files lxgw.dtx,                           *
%%                                   lxgw.ins,                           *
%%                 the derived files ctex-fontset-lxgw.def,              *
%%                                   ctex-zhmap-lxgw.tex,                *
%%                                   ctex-spa-lxgw.tex,                  *
%%                                   ctexpunct-lxgw.spa,                 *
%%                    the font files LXGWWenKaiLite-Regular.ttf,         *
%%                                   LXGWWenKaiGBLite-Regular.ttf,       *
%%                                   LXGWZhenKaiGB-Regular.ttf,          *
%%                                   LXGWMarkerGothic-Regular.ttf,       *
%%                                   LXGWXiaolai-Regular.ttf,            *
%%                                   LXGWYozai-Regular.ttf,              *
%%                                   LXGWYozai-Medium.ttf,               *
%%           the documentation files lxgw.pdf,                           *
%%                               and README.md.                          *
%% -----------------------------------------------------------------------
%%
%% End of file `ctex-fontset-lxgw.def'.
