%%
%% 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>  *
%%            Copyright (C) 2021-2026 by TrionesType <x.com/TrionesType> *
%% -----------------------------------------------------------------------
%%   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.                   *
%% -----------------------------------------------------------------------
\GetIdInfo $Id: lxgw.dtx v1.522E 2026-06-02 myhsia<myhsia@outlook.com>$
  {lxgw fontset configuration for ctex-kit}
\ProvidesExplFile {ctex-fontset-lxgw.def}
  {\ExplFileDate} {\ExplFileVersion} {\ExplFileDescription}
\edef \LXGWFileDate        {\ExplFileDate}
\edef \LXGWFileVersion     {\ExplFileVersion}
\edef \LXGWFileDescription {\ExplFileDescription}
\ctex_fontset_case:nnn
  {
    \ctex_file_input:n { ctexspa-lxgw.def }
    \ctex_zhmap_case:nnn
      {
        \setCJKmainfont { LXGWNeoZhiSong.ttf              }
          [
            cmap           = UniGB-UTF16-H, AutoFakeBold,
            ItalicFont     = LXGWWenKaiGBLite-Regular.ttf,
            BoldItalicFont = LXGWZhenKaiGB-Regular.ttf
          ]
        \setCJKsansfont { LXGWNeoXiHei.ttf                }
          [ cmap = UniGB-UTF16-H, AutoFakeBold, AutoFakeSlant ]
        \setCJKmonofont { LXGWZhuqueFangsong-Regular.ttf  }
          [ cmap = UniGB-UTF16-H, AutoFakeBold, AutoFakeSlant ]
        \setCJKfamilyfont { zhsong } { LXGWNeoZhiSong.ttf             }
          [ cmap = UniGB-UTF16-H, AutoFakeBold, AutoFakeSlant ]
        \setCJKfamilyfont { zhhei  } { LXGWNeoXiHei.ttf               }
          [ cmap = UniGB-UTF16-H, AutoFakeBold, AutoFakeSlant ]
        \setCJKfamilyfont { zhfs   } { LXGWZhuqueFangsong-Regular.ttf }
          [ cmap = UniGB-UTF16-H, AutoFakeBold, AutoFakeSlant ]
        \setCJKfamilyfont { zhkai  } { LXGWWenKaiGBLite-Regular.ttf   }
          [ cmap = UniGB-UTF16-H, AutoFakeSlant,
            BoldFont        = LXGWZhenKaiGB-Regular.ttf,
            SlantedFont     = LXGWWenKaiGBLite-Regular.ttf,
            ItalicFont      = LXGWWenKaiGBLite-Regular.ttf,
            BoldSlantedFont = LXGWZhenKaiGB-Regular.ttf,
            BoldItalicFont  = LXGWZhenKaiGB-Regular.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
      { LXGWNeoZhiSong.ttf              }
      { LXGWNeoZhiSongScreen.ttf        }
      { LXGWWenKaiGBLite-Regular.ttf    }
      { LXGWNeoXiHei.ttf                }
      { LXGWNeoXiHeiScreen.ttf          }
      { LXGWZhuqueFangsong-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 { LXGWNeoZhiSong              }
      [
        Extension      = .ttf, AutoFakeBold,
        ItalicFont     = LXGWWenKaiGBLite-Regular,
        BoldItalicFont = LXGWZhenKaiGB-Regular.ttf,
      ]
    \setCJKsansfont { LXGWNeoXiHei                }
      [ Extension = .ttf, AutoFakeBold,                     AutoFakeSlant ]
    \setCJKmonofont { LXGWZhuqueFangsong-Regular  }
      [ Extension = .ttf, AutoFakeBold,                     AutoFakeSlant ]
    \setCJKfamilyfont { zhsong } { LXGWNeoZhiSong }
      [ Extension = .ttf, AutoFakeBold,                     AutoFakeSlant ]
    \setCJKfamilyfont { zhhei  } { LXGWNeoXiHei               }
      [ Extension = .ttf, AutoFakeBold,                     AutoFakeSlant ]
    \setCJKfamilyfont { zhfs   } { LXGWZhuqueFangsong-Regular }
      [ Extension = .ttf, AutoFakeBold,                     AutoFakeSlant ]
    \setCJKfamilyfont { zhkai  } { LXGWWenKaiGBLite-Regular   }
      [ Extension = .ttf, BoldFont        = LXGWZhenKaiGB-Regular,
                          SlantedFont     = LXGWWenKaiGBLite-Regular,
                          ItalicFont      = LXGWWenKaiGBLite-Regular,
                          BoldSlantedFont = LXGWZhenKaiGB-Regular,
                          BoldItalicFont  = LXGWZhenKaiGB-Regular         ]
  }
\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-make-lxgw.tex,             *
%%                                   ctexspa-lxgw.def,                   *
%%                    the font files LXGWNeoZhiSong.ttf,                 *
%%                                   LXGWNeoZhiSongScreen.ttf,           *
%%                                   LXGWNeoXiHei.ttf,                   *
%%                                   LXGWNeoXiHeiScreen.ttf,             *
%%                                   LXGWZhuqueFangsong-Regular.ttf,     *
%%                                   LXGWWenKaiLite-Regular.ttf,         *
%%                                   LXGWZhenKaiGB-Regular.ttf,          *
%%           the documentation files lxgw.pdf,                           *
%%                               and README.md.                          *
%% -----------------------------------------------------------------------
%%
%% End of file `ctex-fontset-lxgw.def'.
