%%
%% 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.                   *
%% -----------------------------------------------------------------------
\ProvidesExplFile {ctex-fontset-lxgw.def} {2026-02-07} {v1.521N}
  {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 { LXGWNeoZhiSong.ttf              }
          [
            cmap           = UniGB-UTF16-H, AutoFakeBold,
            ItalicFont     = LXGWWenKaiGBLite-Regular.ttf,
            BoldItalicFont = LXGWZhenKaiGB-Regular.ttf
          ]
        \setCJKsansfont { LXGWNeoXiHei.ttf                }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKmonofont { LXGWZhuqueFangsong-Regular.ttf  }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhsong } { LXGWNeoZhiSong.ttf             }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhhei  } { LXGWNeoXiHei.ttf               }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhfs   } { LXGWZhuqueFangsong-Regular.ttf }
          [ cmap = UniGB-UTF16-H, AutoFakeBold ]
        \setCJKfamilyfont { zhkai  } { LXGWWenKaiGBLite-Regular.ttf   }
          [ cmap = UniGB-UTF16-H, BoldFont = 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 ]
    \setCJKmonofont { LXGWZhuqueFangsong-Regular  }
      [ Extension = .ttf, AutoFakeBold  ]
    \setCJKfamilyfont { zhsong } { LXGWNeoZhiSong }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKfamilyfont { zhhei  } { LXGWNeoXiHei               }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKfamilyfont { zhfs   } { LXGWZhuqueFangsong-Regular }
      [ Extension = .ttf, AutoFakeBold ]
    \setCJKfamilyfont { zhkai  } { LXGWWenKaiGBLite-Regular   }
      [ Extension = .ttf, BoldFont = 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-lxgw.spa,                  *
%%                                   ctexpunct-lxgw.tex,                 *
%%                    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'.
