<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse
%&lt;*internal&gt;
\begingroup
\input l3docstrip.tex\relax
\keepsilent
\usedir{tex/latex/fontspec}
\let\MetaPrefix\relax
\preamble
------------------------------------------------
The FONTSPEC package for XeLaTeX/LuaLaTeX
(C)  2004--2017  Will Robertson and Khaled Hosny
License information appended.
------------------------------------------------
\endpreamble
\postamble
------------------------------------------------
Copyright 2004--2017 Will Robertson &lt;will.robertson@latex-project.org&gt;
Copyright 2009--2013   Khaled Hosny &lt;khaledhosny@eglug.org&gt;

Distributable under the LaTeX Project Public License, version 1.3c or higher.
The latest version of this license is at: http://www.latex-project.org/lppl.txt

This work is "maintained" by Will Robertson.
It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
------------------------------------------------
\endpostamble
\askforoverwritefalse
\def\MetaPrefix{-- }
\generate{\file{fontspec.lua}{\from{fontspec.dtx}{lua}\from{fontspec-lua.dtx}{lua}}}
\let\MetaPrefix\DoubleperCent
\ifx\FontspecDebug\undefined\def\FSDEBUG{}\else\def\FSDEBUG{,debug}\fi

\generate{\file{fontspec.sty}{
  \from{fontspec.dtx}{fontspec,load\FSDEBUG}
}}

\gdef\FONTSPECDTX{
  \DTX{fontspec.dtx}
  \DTX{fontspec-vars.dtx}
  \DTX{fontspec-msg.dtx}
  \DTX{fontspec-opening.dtx}
  \DTX{fontspec-fontload.dtx}
  \DTX{fontspec-user.dtx}
  \DTX{fontspec-api.dtx}
  \DTX{fontspec-internal.dtx}
  \DTX{fontspec-opentype.dtx}
  \DTX{fontspec-graphite.dtx}
  \DTX{fontspec-keyval.dtx}
  \DTX{fontspec-feat-opentype.dtx}
  \DTX{fontspec-scripts.dtx}
  \DTX{fontspec-lang.dtx}
  \DTX{fontspec-feat-aat.dtx}
  \DTX{fontspec-enc.dtx}
  \DTX{fontspec-math.dtx}
  \DTX{fontspec-closing.dtx}
  \DTX{fontspec-xfss.dtx}
  \DTX{fontspec-patches.dtx}
}

\def\DTX#1{\from{#1}{fontspec,xetexx\FSDEBUG}}
\generate{\file{fontspec-xetex.sty}{\FONTSPECDTX}}

\def\DTX#1{\from{#1}{fontspec,luatex\FSDEBUG}}
\generate{\file{fontspec-luatex.sty}{\FONTSPECDTX}}

\def\tmpa{plain}
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
\endgroup
%&lt;/internal&gt;
%&lt;*fontspec&gt;
\RequirePackage{expl3}
\RequirePackage{xparse}
%&lt;/fontspec&gt;
%&lt;*driver&gt;
\ProvidesExplFile{fontspec.dtx}
%&lt;/driver&gt;
%&lt;fontspec&amp;!xetexx&amp;!luatex&gt;\ProvidesExplPackage{fontspec}%
%&lt;fontspec&amp;xetexx&gt;\ProvidesExplPackage{fontspec-xetex}%
%&lt;fontspec&amp;luatex&gt;\ProvidesExplPackage{fontspec-luatex}%
%&lt;*fontspec&gt;
  {2017/02/12}{2.6}{Font selection for XeLaTeX and LuaLaTeX}
%&lt;/fontspec&gt;
%&lt;lua&gt;fontspec          = fontspec or {}
%&lt;lua&gt;local fontspec    = fontspec
%&lt;lua&gt;fontspec.module   = {
%&lt;lua&gt;    name          = "fontspec",
%&lt;lua&gt;    version       = "2.6",
%&lt;lua&gt;    date          = "2017/02/12",
%&lt;lua&gt;    description   = "Font selection for XeLaTeX and LuaLaTeX",
%&lt;lua&gt;    author        = "Khaled Hosny, Philipp Gesang, Will Robertson",
%&lt;lua&gt;    copyright     = "Khaled Hosny, Philipp Gesang, Will Robertson",
%&lt;lua&gt;    license       = "LPPL"
%&lt;lua&gt;}
%
%&lt;*driver&gt;
\ExplSyntaxOff
\providecommand\ENDDOCUMENT{}
\input{fontspec-doc.tex}
\StopEventually{}
\part{Implementation}
\def\DTX#1{\DocInput{#1}}
\FONTSPECDTX
\clearpage
\PrintChanges
\clearpage
\setcounter{IndexColumns}{2}
\PrintIndex
\Finale
\end{document}
%&lt;/driver&gt;
% \fi
%
% \section{Loading}
%
% The \textsf{expl3} module is \texttt{fontspec}.
%    \begin{macrocode}
%&lt;@@=fontspec&gt;
%    \end{macrocode}
%
% Check engine and load specific modules.
% For Lua\TeX, load \pkg{luaotfload}.
%    \begin{macrocode}
%&lt;*load&gt;
\sys_if_engine_luatex:T
  { \RequirePackage{luaotfload}
    \directlua{require("fontspec")}
    \RequirePackageWithOptions{fontspec-luatex} \endinput }
\sys_if_engine_xetex:T
  { \RequirePackageWithOptions{fontspec-xetex}  \endinput }
%    \end{macrocode}
% If not one of the above, error:
%    \begin{macrocode}
\msg_new:nnn {fontspec} {cannot-use-pdftex}
 {
  The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
  You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
 }
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
\endinput
%&lt;/load&gt;
%    \end{macrocode}
\endinput
</pre></body></html>