summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontrange-OT2.def7
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontrange-T1.def198
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontrange-TS1.def134
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-doc-style.sty283
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty2720
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty2928
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua18
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty10
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tuenc.def464
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def198
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def134
11 files changed, 4596 insertions, 2498 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontrange-OT2.def b/Master/texmf-dist/tex/latex/fontspec/fontrange-OT2.def
new file mode 100644
index 00000000000..b18375da88a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontrange-OT2.def
@@ -0,0 +1,7 @@
+
+\DeclareTextSymbol{\CYRIE}{\LastDeclaredEncoding}{"0404}
+\DeclareTextSymbol{\CYRDJE}{\LastDeclaredEncoding}{"0402}
+\DeclareTextSymbol{\CYRTSHE}{\LastDeclaredEncoding}{"040B}
+\DeclareTextSymbol{\cyrnje}{\LastDeclaredEncoding}{"045A}
+\DeclareTextSymbol{\cyrlje}{\LastDeclaredEncoding}{"0459}
+\DeclareTextSymbol{\cyrdzhe}{\LastDeclaredEncoding}{"045F}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontrange-T1.def b/Master/texmf-dist/tex/latex/fontspec/fontrange-T1.def
new file mode 100644
index 00000000000..d8fd90b23d8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontrange-T1.def
@@ -0,0 +1,198 @@
+\ProvidesFile{fontrange-T1.def}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% T1 SYMBOLS
+
+\EncodingAccent{\`}{"0300}
+\EncodingAccent{\'}{"0301}
+\EncodingAccent{\^}{"0302}
+\EncodingAccent{\~}{"0303}
+\EncodingAccent{\"}{"0308}
+\EncodingAccent{\H}{"030B}
+\EncodingAccent{\r}{"030A}
+\EncodingAccent{\v}{"030C}
+\EncodingAccent{\u}{"0306}
+\EncodingAccent{\=}{"0304}
+\EncodingAccent{\.}{"0307}
+\EncodingAccent{\b}{"0332}
+\EncodingAccent{\c}{"0327}
+\EncodingAccent{\d}{"0323}
+\EncodingAccent{\k}{"0328}
+%% \textogonekcentered %% not in unicode?
+\EncodingSymbol{\textperthousand}{"2030}
+\EncodingSymbol{\textpertenthousand}{"2031}
+\EncodingSymbol{\AE}{"00C6}
+\EncodingSymbol{\DH}{"00D0}
+\EncodingSymbol{\DJ}{"0110}
+\EncodingSymbol{\L} {"0141}
+\EncodingSymbol{\NG}{"014A}
+\EncodingSymbol{\OE}{"0152}
+\EncodingSymbol{\O} {"00D8}
+\EncodingSymbol{\SS}{"1E9E}
+\EncodingSymbol{\TH}{"00DE}
+\EncodingSymbol{\ae}{"00E6}
+\EncodingSymbol{\dh}{"00F0}
+\EncodingSymbol{\dj}{"0111}
+\EncodingSymbol{\guillemotleft}{"00AB}
+\EncodingSymbol{\guillemotright}{"00BB}
+\EncodingSymbol{\guilsinglleft}{"2039}
+\EncodingSymbol{\guilsinglright}{"203A}
+\EncodingSymbol{\i} {"0131}
+\EncodingSymbol{\j} {"0237}
+\EncodingSymbol{\ij}{"0133}
+\EncodingSymbol{\IJ}{"0132}
+\EncodingSymbol{\l} {"0142}
+\EncodingSymbol{\ng}{"014B}
+\EncodingSymbol{\oe}{"0153}
+\EncodingSymbol{\o} {"00F8}
+\EncodingSymbol{\quotedblbase}{"201E}
+\EncodingSymbol{\quotesinglbase}{"201A}
+\EncodingSymbol{\ss}{"00DF}
+\EncodingSymbol{\textasciicircum}{`\^}
+\EncodingSymbol{\textasciitilde}{`\~}
+\EncodingSymbol{\textbackslash}{`\\}
+\EncodingSymbol{\textbar}{`\|}
+\EncodingSymbol{\textbraceleft}{`\{}
+\EncodingSymbol{\textbraceright}{`\}}
+\EncodingSymbol{\textcompwordmark}{"200C}
+\EncodingSymbol{\textdollar}{`\$}
+\EncodingSymbol{\textemdash}{"2014}
+\EncodingSymbol{\textendash}{"2013}
+\EncodingSymbol{\textexclamdown}{"00A1}
+\EncodingSymbol{\textgreater}{`\>}
+\EncodingSymbol{\textless}{`\<}
+\EncodingSymbol{\textquestiondown}{"00BF}
+\EncodingSymbol{\textquotedblleft}{"201C}
+\EncodingSymbol{\textquotedblright}{"201D}
+\EncodingSymbol{\textquotedbl}{`\"}
+\EncodingSymbol{\textquoteleft}{"2018}
+\EncodingSymbol{\textquoteright}{"2019}
+\EncodingSymbol{\textsection}{"00A7}
+\EncodingSymbol{\textsterling}{"00A3}
+\EncodingSymbol{\textunderscore}{`\_}
+\EncodingSymbol{\textvisiblespace}{"2423}
+\EncodingSymbol{\th}{"00FE}
+\EncodingComposite{\.}{i}{`\i}
+\EncodingComposite{\.}{\i}{`\i}
+\EncodingComposite{\u}{A}{"0102}
+\EncodingComposite{\k}{A}{"0104}
+\EncodingComposite{\'}{C}{"0106}
+\EncodingComposite{\v}{C}{"010C}
+\EncodingComposite{\v}{D}{"010E}
+\EncodingComposite{\v}{E}{"011A}
+\EncodingComposite{\k}{E}{"0118}
+\EncodingComposite{\u}{G}{"011E}
+\EncodingComposite{\'}{L}{"0139}
+\EncodingComposite{\v}{L}{"013D}
+\EncodingComposite{\'}{N}{"0143}
+\EncodingComposite{\v}{N}{"0147}
+\EncodingComposite{\H}{O}{"0150}
+\EncodingComposite{\'}{R}{"0154}
+\EncodingComposite{\v}{R}{"0158}
+\EncodingComposite{\'}{S}{"015A}
+\EncodingComposite{\v}{S}{"0160}
+\EncodingComposite{\c}{S}{"015F}
+\EncodingComposite{\v}{T}{"0164}
+\EncodingComposite{\c}{T}{"0162}
+\EncodingComposite{\H}{U}{"0170}
+\EncodingComposite{\r}{U}{"016E}
+\EncodingComposite{\"}{Y}{"0178}
+\EncodingComposite{\'}{Z}{"017A}
+\EncodingComposite{\v}{Z}{"017D}
+\EncodingComposite{\.}{Z}{"017B}
+\EncodingComposite{\.}{I}{"0130}
+\EncodingComposite{\u}{a}{"0103}
+\EncodingComposite{\k}{a}{"0105}
+\EncodingComposite{\'}{c}{"0107}
+\EncodingComposite{\v}{c}{"010D}
+\EncodingComposite{\v}{d}{"010F}
+\EncodingComposite{\v}{e}{"011B}
+\EncodingComposite{\k}{e}{"0119}
+\EncodingComposite{\u}{g}{"011F}
+\EncodingComposite{\'}{l}{"0139}
+\EncodingComposite{\v}{l}{"013E}
+\EncodingComposite{\'}{n}{"0144}
+\EncodingComposite{\v}{n}{"0148}
+\EncodingComposite{\H}{o}{"0151}
+\EncodingComposite{\'}{r}{"0155}
+\EncodingComposite{\v}{r}{"0159}
+\EncodingComposite{\'}{s}{"015B}
+\EncodingComposite{\v}{s}{"0161}
+\EncodingComposite{\c}{s}{"015F}
+\EncodingComposite{\v}{t}{"0165}
+\EncodingComposite{\c}{t}{"0163}
+\EncodingComposite{\H}{u}{"0171}
+\EncodingComposite{\r}{u}{"016F}
+\EncodingComposite{\"}{y}{"00FF}
+\EncodingComposite{\'}{z}{"00FD}
+\EncodingComposite{\v}{z}{"017E}
+\EncodingComposite{\.}{z}{"017C}
+\EncodingComposite{\`}{A}{"00C0}
+\EncodingComposite{\'}{A}{"00C1}
+\EncodingComposite{\^}{A}{"00C2}
+\EncodingComposite{\~}{A}{"00C3}
+\EncodingComposite{\"}{A}{"00C4}
+\EncodingComposite{\r}{A}{"00C5}
+\EncodingComposite{\c}{C}{"00C7}
+\EncodingComposite{\`}{E}{"00C8}
+\EncodingComposite{\'}{E}{"00C9}
+\EncodingComposite{\^}{E}{"00CA}
+\EncodingComposite{\"}{E}{"00CB}
+\EncodingComposite{\`}{I}{"00CC}
+\EncodingComposite{\'}{I}{"00CD}
+\EncodingComposite{\^}{I}{"00CE}
+\EncodingComposite{\"}{I}{"00CF}
+\EncodingComposite{\~}{N}{"00D1}
+\EncodingComposite{\`}{O}{"00D2}
+\EncodingComposite{\'}{O}{"00D3}
+\EncodingComposite{\^}{O}{"00D4}
+\EncodingComposite{\~}{O}{"00D5}
+\EncodingComposite{\"}{O}{"00D6}
+\EncodingComposite{\`}{U}{"00D9}
+\EncodingComposite{\'}{U}{"00DA}
+\EncodingComposite{\^}{U}{"00DB}
+\EncodingComposite{\"}{U}{"00DC}
+\EncodingComposite{\'}{Y}{"00DD}
+\EncodingComposite{\`}{a}{"00E0}
+\EncodingComposite{\'}{a}{"00E1}
+\EncodingComposite{\^}{a}{"00E2}
+\EncodingComposite{\~}{a}{"00E3}
+\EncodingComposite{\"}{a}{"00E4}
+\EncodingComposite{\r}{a}{"00E5}
+\EncodingComposite{\c}{c}{"00E7}
+\EncodingComposite{\`}{e}{"00E8}
+\EncodingComposite{\'}{e}{"00E9}
+\EncodingComposite{\^}{e}{"00EA}
+\EncodingComposite{\"}{e}{"00EB}
+\EncodingComposite{\`}{i} {"00EC}
+\EncodingComposite{\`}{\i}{"00EC}
+\EncodingComposite{\'}{i} {"00ED}
+\EncodingComposite{\'}{\i}{"00ED}
+\EncodingComposite{\^}{i} {"00EE}
+\EncodingComposite{\^}{\i}{"00EE}
+\EncodingComposite{\"}{i} {"00EF}
+\EncodingComposite{\"}{\i}{"00EF}
+\EncodingComposite{\~}{n}{"00F1}
+\EncodingComposite{\`}{o}{"00F2}
+\EncodingComposite{\'}{o}{"00F3}
+\EncodingComposite{\^}{o}{"00F4}
+\EncodingComposite{\~}{o}{"00F5}
+\EncodingComposite{\"}{o}{"00F6}
+\EncodingComposite{\`}{u}{"00F9}
+\EncodingComposite{\'}{u}{"00FA}
+\EncodingComposite{\^}{u}{"00FB}
+\EncodingComposite{\"}{u}{"00FC}
+\EncodingComposite{\'}{y}{"00FD}
+\EncodingComposite{\k}{o}{"01EB}
+\EncodingComposite{\k}{O}{"01EA}
+
+\EncodingComposite{\c}{G}{"0122}
+\EncodingComposite{\c}{g}{"0123} % note this cedilla is above not below :)
+\EncodingComposite{\c}{K}{"0136}
+\EncodingComposite{\c}{k}{"0137}
+\EncodingComposite{\c}{L}{"013B}
+\EncodingComposite{\c}{l}{"013C}
+\EncodingComposite{\c}{N}{"0145}
+\EncodingComposite{\c}{n}{"0146}
+\EncodingComposite{\c}{R}{"0156}
+\EncodingComposite{\c}{r}{"0157}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontrange-TS1.def b/Master/texmf-dist/tex/latex/fontspec/fontrange-TS1.def
new file mode 100644
index 00000000000..f7e3eb9ca81
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontrange-TS1.def
@@ -0,0 +1,134 @@
+\ProvidesFile{fontrange-TS1.def}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TS1 symbols
+
+\EncodingAccent{\capitalcedilla}{"0327}
+\EncodingAccent{\capitalogonek}{"0328}
+\EncodingAccent{\capitalgrave}{"0300}
+\EncodingAccent{\capitalacute}{"0301}
+\EncodingAccent{\capitalcircumflex}{"0302}
+\EncodingAccent{\capitaltilde}{"0303}
+\EncodingAccent{\capitaldieresis}{"0308}
+\EncodingAccent{\capitalhungarumlaut}{"030B}
+\EncodingAccent{\capitalring}{"030A}
+\EncodingAccent{\capitalcaron}{"030C}
+\EncodingAccent{\capitalbreve}{"0306}
+\EncodingAccent{\capitalmacron}{"0304}
+\EncodingAccent{\capitaldotaccent}{"0307}
+\EncodingAccent{\t}{"0361}
+\EncodingAccent{\capitaltie}{"0361}
+\EncodingAccent{\newtie}{"0311}
+\EncodingAccent{\capitalnewtie}{"0311}
+%%\EncodingSymbol{\textcapitalcompwordmark}{23}
+%%\EncodingSymbol{\textascendercompwordmark}{31}
+\EncodingSymbol{\textquotestraightbase}{"201A}
+\EncodingSymbol{\textquotestraightdblbase}{"201E}
+\EncodingSymbol{\texttwelveudash}{"2015}
+\EncodingSymbol{\textthreequartersemdash}{"2012}
+\EncodingSymbol{\textleftarrow}{"2190}
+\EncodingSymbol{\textrightarrow}{"2192}
+\EncodingSymbol{\textblank}{"2422}
+\EncodingSymbol{\textdollar}{`\$}
+\EncodingSymbol{\textquotesingle}{`\'}
+\EncodingSymbol{\textasteriskcentered}{"204E}
+%% \EncodingSymbol{\textdblhyphen}{45}
+\EncodingSymbol{\textfractionsolidus}{"2044}
+%%\EncodingSymbol{\textzerooldstyle}{48}
+%%\EncodingSymbol{\textoneoldstyle}{49}
+%%\EncodingSymbol{\texttwooldstyle}{50}
+%%\EncodingSymbol{\textthreeoldstyle}{51}
+%%\EncodingSymbol{\textfouroldstyle}{52}
+%%\EncodingSymbol{\textfiveoldstyle}{53}
+%%\EncodingSymbol{\textsixoldstyle}{54}
+%%\EncodingSymbol{\textsevenoldstyle}{55}
+%%\EncodingSymbol{\texteightoldstyle}{56}
+%%\EncodingSymbol{\textnineoldstyle}{57}
+\EncodingSymbol{\textlangle}{"27E8}
+\EncodingSymbol{\textminus}{"2212}
+\EncodingSymbol{\textrangle}{"27E9}
+\EncodingSymbol{\textmho}{"2127}
+\EncodingSymbol{\textbigcircle}{"25EF}
+\EncodingAccent{\textcircled}{"20DD}
+\EncodingSymbol{\textohm}{"2126}
+\EncodingSymbol{\textlbrackdbl}{"301A}
+\EncodingSymbol{\textrbrackdbl}{"301B}
+\EncodingSymbol{\textuparrow}{"2191}
+\EncodingSymbol{\textdownarrow}{"2193}
+\EncodingSymbol{\textasciigrave}{`\`}
+\EncodingSymbol{\textborn}{"2605} %% actually "black star" but close enough
+\EncodingSymbol{\textdivorced}{"26AE}
+\EncodingSymbol{\textdied}{"2020} %% different from "dagger"??
+%% \EncodingSymbol{\textleaf}{108}
+\EncodingSymbol{\textmarried}{"26AD}
+\EncodingSymbol{\textmusicalnote}{"266A}
+\EncodingSymbol{\texttildelow}{"02F7}
+%% \EncodingSymbol{\textdblhyphenchar}{127} %% can't obtain this without deactivating font mapping :(
+\EncodingSymbol{\textasciibreve}{"02D8}
+\EncodingSymbol{\textasciicaron}{"02C7}
+\EncodingSymbol{\textacutedbl}{"02DD}
+\EncodingSymbol{\textgravedbl}{"02F5}
+\EncodingSymbol{\textdagger}{"2020}
+\EncodingSymbol{\textdaggerdbl}{"2021}
+\EncodingSymbol{\textbardbl}{"2016}
+\EncodingSymbol{\textperthousand}{"2030}
+\EncodingSymbol{\textbullet}{"2022}
+\EncodingSymbol{\textcelsius}{"2103}
+%% \EncodingSymbol{\textdollaroldstyle}{138}
+%% \EncodingSymbol{\textcentoldstyle}{139}
+\EncodingSymbol{\textflorin}{"0192}
+\EncodingSymbol{\textcolonmonetary}{"20A1}
+\EncodingSymbol{\textwon}{"20A9}
+\EncodingSymbol{\textnaira}{"20A6}
+%% \EncodingSymbol{\textguarani}{144}
+\EncodingSymbol{\textpeso}{"20B1}
+\EncodingSymbol{\textlira}{"20A4}
+\EncodingSymbol{\textrecipe}{"211E}
+\EncodingSymbol{\textinterrobang}{"203D}
+\EncodingSymbol{\textinterrobangdown}{"2E18}
+\EncodingSymbol{\textdong}{"20AB}
+\EncodingSymbol{\texttrademark}{"2122}
+\EncodingSymbol{\textpertenthousand}{"2031}
+\EncodingSymbol{\textpilcrow}{"00B6}
+\EncodingSymbol{\textbaht}{"0E3F}
+\EncodingSymbol{\textnumero}{"2116}
+\EncodingSymbol{\textdiscount}{"2052}
+\EncodingSymbol{\textestimated}{"212E}
+\EncodingSymbol{\textopenbullet}{"25E6}
+\EncodingSymbol{\textservicemark}{"2120}
+\EncodingSymbol{\textlquill}{"2045}
+\EncodingSymbol{\textrquill}{"2046}
+\EncodingSymbol{\textcent}{"00A2}
+\EncodingSymbol{\textsterling}{"00A3}
+\EncodingSymbol{\textcurrency}{"00A4}
+\EncodingSymbol{\textyen}{"00A5}
+\EncodingSymbol{\textbrokenbar}{"00A6}
+\EncodingSymbol{\textsection}{"00A7}
+\EncodingSymbol{\textasciidieresis}{"00A8}
+\EncodingSymbol{\textcopyright}{"00A9}
+\EncodingSymbol{\textordfeminine}{"00AA}
+%% \EncodingSymbol{\textcopyleft}{171}
+\EncodingSymbol{\textlnot}{"00AC}
+\EncodingSymbol{\textcircledP}{"2117}
+\EncodingSymbol{\textregistered}{"00AE}
+\EncodingSymbol{\textasciimacron}{"00AF}
+\EncodingSymbol{\textdegree}{"00B0}
+\EncodingSymbol{\textpm}{"00B1}
+\EncodingSymbol{\texttwosuperior}{"00B2}
+\EncodingSymbol{\textthreesuperior}{"00B3}
+\EncodingSymbol{\textasciiacute}{"00B4}
+\EncodingSymbol{\textmu}{"00B5}
+\EncodingSymbol{\textparagraph}{"00B6}
+\EncodingSymbol{\textperiodcentered}{"00B7}
+\EncodingSymbol{\textreferencemark}{"203B}
+\EncodingSymbol{\textonesuperior}{"00B9}
+\EncodingSymbol{\textordmasculine}{"00BA}
+\EncodingSymbol{\textsurd}{"221A}
+\EncodingSymbol{\textonequarter}{"00BC}
+\EncodingSymbol{\textonehalf}{"00BD}
+\EncodingSymbol{\textthreequarters}{"00BE}
+\EncodingSymbol{\texteuro}{"20AC}
+\EncodingSymbol{\texttimes}{"00D7}
+\EncodingSymbol{\textdiv}{"00F7}
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-doc-style.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-doc-style.sty
new file mode 100644
index 00000000000..3d7fe1232a0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-doc-style.sty
@@ -0,0 +1,283 @@
+\ProvidesPackage{fontspec-doc-style}
+
+\usepackage{fontspec,booktabs,calc,caption,color,enumitem,flafter,fancyvrb,hologo,graphicx,
+ ifthen,url,varioref,varwidth,microtype,tocloft,framed,xparse,docmute}
+
+%% Various labelling commands:
+\newcommand*\name[1]{{#1}}
+\newcommand*\pkg[1]{\textsf{#1}}
+\newcommand*\opt[1]{\texttt{#1}}
+\newcommand*\feat[1]{\texttt{#1}}
+
+\let\latin\textit
+\def\eg{\latin{e.g.}}
+\def\ie{\latin{i.e.}}
+\def\Eg{\latin{E.g.}}
+\def\Ie{\latin{I.e.}}
+\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
+
+\newcommand\note[1]{\unskip\footnote{#1}}
+
+\def\MacOSX{Mac~OS~X}
+\def\AAT{\textsc{aat}}
+\def\ATSUI{\textsc{atsui}}
+
+\newcommand\NFSS{\textsc{nfss}}
+\newcommand\XeTeX{\hologo{XeTeX}}
+\newcommand\XeLaTeX{\hologo{XeLaTeX}}
+\newcommand\LuaTeX{\hologo{LuaTeX}}
+\newcommand\LuaLaTeX{\hologo{LuaLaTeX}}
+
+% ToC formatting:
+\setlength\cftsubsecnumwidth{1.4\cftsubsecnumwidth}
+%\def\@cfttocstart{\small\begin{multicols}{2}}
+%\def\@cfttocfinish{\end{multicols}}
+
+\fvset{gobble=0}
+
+\captionsetup[table]{position=above}
+\captionsetup[figure]{position=above}
+
+
+%% Fonts
+
+\defaultfontfeatures{Numbers=OldStyle}
+\IfFontExistsTF{AldusNovaPro-Book.otf}
+ {
+ \setmainfont{aldus-nova}
+ \setsansfont{palatino-sans-light}
+ }
+ {
+\setmainfont{texgyrepagella}[
+ Extension = .otf,
+ UprightFont = *-regular ,
+ ItalicFont = *-italic ,
+ BoldFont = *-bold ,
+ BoldItalicFont = *-bolditalic ,
+]
+\setsansfont{texgyreheros}[
+ Extension = .otf,
+ UprightFont = *-regular ,
+ ItalicFont = *-italic ,
+ BoldFont = *-bold ,
+ BoldItalicFont = *-bolditalic ,
+]
+ }
+\setmonofont{lmmonolt10-regular.otf}[BoldFont=lmmonolt10-bold.otf]
+\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf}
+
+%% (La)TeX font-related declarations:
+\linespread{1.05} % Pagella needs more space between lines
+\frenchspacing % Remove ugly extra space after punctuation
+
+\usepackage[
+ bookmarks=true,
+ colorlinks=true,
+ linkcolor=niceblue,
+ urlcolor=niceblue,
+ citecolor=niceblue,
+ pdftitle={The fontspec package},
+ pdfsubject={Advanced font selection for XeLaTeX/LuaLaTeX},
+ pdfauthor={Will Robertson},
+ pdfkeywords={xetex, xelatex, luatex, lualatex, unicode, opentype, aat}
+ ]{hyperref}
+
+
+
+%% ToC
+\def\@dotsep{1000}
+\setcounter{tocdepth}{2}
+\setlength\columnseprule{0.4pt}
+\renewcommand\tableofcontents{\relax
+ \begin{multicols}{2}[\section*{\contentsname}]\relax
+ \@starttoc{toc}\relax
+ \end{multicols}}
+
+
+%% Index
+\setcounter{IndexColumns}{2}
+\renewenvironment{theglossary}
+ {\small\list{}{}
+ \item\relax
+ \glossary@prologue\GlossaryParms
+ \let\item\@idxitem \ignorespaces
+ \def\pfill{\hspace*{\fill}}}
+ {\endlist}
+
+
+
+%% varioref definitions:
+\labelformat{table}{Table~#1}
+\labelformat{section}{Section~#1}
+\labelformat{subsection}{Section~#1}
+
+\definecolor{niceblue}{rgb}{0.1,0.2,0.8}
+
+
+
+
+%% EXAMPLES
+
+\newsavebox\X
+\newsavebox\Y
+
+\newcounter{example}
+
+\newcommand\exref[1]{Example~\ref{ex:#1}}
+\newcommand\Exref[1]{Example~\ref{ex:#1}}
+
+\newenvironment{Xexample}[3][]
+ {\VerbatimEnvironment\begin{Fexample}[#1]{#2}{#3}{X}}
+ {\end{Fexample}}
+
+\newenvironment{Lexample}[3][]
+ {\VerbatimEnvironment\begin{Fexample}[#1]{#2}{#3}{L}}
+ {\end{Fexample}}
+
+\newenvironment{Fexample}[4][]
+ {%
+ \def\options{#1}%
+ \def\filename{#2}%
+ \def\captiontext{#3}%
+ \def\prefix{#4}
+ \refstepcounter{example}%
+ \label{ex:\filename}%
+ \IfFileExists{zzz-\theexample-\prefix-\filename.tex}{}{%
+ \immediate\write18{rm -f zzz-\theexample-* ;}%
+ }%
+ \VerbatimEnvironment
+ \begin{VerbatimOut}{zzz-\theexample-\prefix-\filename.tex}}
+% text in the environment
+ {\end{VerbatimOut}
+ \begin{figure}
+ \setlength\parindent{0pt}%
+ \edef\@tempa{[gobble=0,fontsize=\noexpand\small,\options]}%
+ \savebox\X{%
+ \expandafter\BVerbatimInput
+ \@tempa{zzz-\theexample-\prefix-\filename.tex}%
+ }%
+ \IfFileExists{zzz-\theexample-\prefix-\filename.pdf}{}
+ {%
+ \edef\XXcmd{%
+ \unexpanded{%
+ \RequirePackage{luatex85}
+ \documentclass[margin=0.2mm]{standalone}
+ \usepackage{booktabs,ifthen,graphicx,xcolor,varwidth}
+ \usepackage{fontspec}
+ \defaultfontfeatures{Ligatures=TeX}
+ \begin{document}
+ \begin{varwidth}{0.7\linewidth}
+ \input} zzz-\theexample-\prefix-\filename.tex
+ \unexpanded{
+ \end{varwidth}
+ \end{document}
+ }%
+ }%
+ \edef\1{%
+ \csname prog@\prefix\endcsname "\unexpanded\expandafter{\XXcmd}";
+ printf '\@percentchar s' '\unexpanded\expandafter{\XXcmd}' > zzz-\theexample-\prefix-\filename-test.tex;
+ }%
+ \immediate\write18{\unexpanded\expandafter{\1}}%
+ }%
+ \savebox\Y{%
+ \IfFileExists{zzz-\theexample-\prefix-\filename.pdf}
+ {\includegraphics{zzz-\theexample-\prefix-\filename.pdf}}
+ {\color{red}\itshape ---Graphic not generated---}%
+ }
+ % TYPESETTING
+ \rule[0.5\baselineskip]{\columnwidth}{1pt}%
+ \vspace{-1.2ex}%
+ \def\@tempa{\small\textsf{Example~\theexample:~}}%
+ \settowidth\@tempdima{\@tempa\captiontext}%
+ \par
+ \ifdim\@tempdima>\linewidth
+ \settowidth\@tempdima{\@tempa}%
+ \@tempa\parbox[t]{\linewidth-\@tempdima}{\small\captiontext}%
+ \vspace{0.4\baselineskip}%
+ \else
+ \parbox{\linewidth}{\centering\@tempa~\captiontext}%
+ \fi
+ \par\rule[0.4\baselineskip]{\columnwidth}{0.4pt}\par
+ \ifdim\dimexpr\wd\X+\wd\Y>\linewidth\relax
+ \null\hfill\makebox[0pt][r]{\usebox\Y}\usebox\X
+ \else
+ \hfill\usebox\Y\hfill\usebox\X
+ \fi
+ \par\rule[0.5\baselineskip]{\columnwidth}{1pt}
+ \end{figure}
+}
+
+\def\prog@X{xelatex
+ -jobname=zzz-\theexample-X-\filename\space}
+
+\def\prog@L{lualatex
+ -jobname=zzz-\theexample-L-\filename\space}
+
+%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand*\setexsize[1]{\let\examplesize#1}
+\newcommand*\setverbwidth[1]{\def\auxwidth{#1}}
+
+
+
+\newcounter{argument}
+\g@addto@macro\endmacro{\setcounter{argument}{0}}
+\newcommand*\darg[1]{%
+ \stepcounter{argument}%
+ \noindent{\ttfamily\char`\#\theargument~:~}#1\par}
+\newcommand*\doarg[1]{%
+ \stepcounter{argument}%
+ \noindent{\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par}
+
+\newcommand\unichar[2]{\textsc{\MakeLowercase{u+#1: #2}}}
+
+\newcommand\cmdbox[1]{%
+ \smallskip\par\noindent
+ \fbox{\begin{varwidth}{\linewidth}
+ #1%
+ \end{varwidth}}%
+ \smallskip
+}
+\def\CMD#1{\texttt{\null#1\unskip}}
+
+
+\NewDocumentCommand \otf {somm} {%
+ \featname & #3 & \texttt{#4}
+ \IfBooleanT #1 { & \textdagger }
+ \\
+}
+\newenvironment{features}[1]{%
+ \def\NOTE{}
+ \def\thisfeatname{#1}%
+ \def\featname{\thisfeatname~~\texttt=~~\null\gdef\featname{}}%
+ \begin{table}
+ \caption{Options for the OpenType font feature `\thisfeatname'.}
+ \edef\@tempa{\noexpand\label{feat:\thisfeatname}}\@tempa
+ \centering
+ \begin{tabular}{@{}l@{}l@{\hspace{0.5\tabcolsep}}l@{\hspace{0.5\tabcolsep}}l@{}}
+ \toprule
+ Feature & Option & Tag & \\
+ \midrule
+}{
+ \bottomrule
+ \end{tabular}
+ \par\smallskip
+ \footnotesize
+ \textdagger\ These feature options can be disabled with \texttt{..Off} variants, and reset \\ to default state (neither explicitly on nor off) with \texttt{..Reset}.
+ \NOTE
+ \end{table}
+}
+
+
+%%%%%%%%%%%
+
+\def \MakePrivateLetters {%
+ \catcode `\@ = 11
+ \catcode `\_ = 11
+ \catcode `\: = 11
+}
+
+%% for LaTeX3 csnames
+\catcode `\_= 11
+
+\renewcommand\partname{Part}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index da5b9ac1558..4679d8c63d5 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -5,26 +5,33 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,luatex')
-%% fontspec-vars.dtx (with options: `vars')
-%% fontspec-msg.dtx (with options: `msg')
+%% fontspec-vars.dtx (with options: `fontspec,luatex')
+%% fontspec-msg.dtx (with options: `fontspec,luatex')
%% fontspec-opening.dtx (with options: `fontspec,luatex')
%% fontspec-fontload.dtx (with options: `fontspec,luatex')
%% fontspec-user.dtx (with options: `fontspec,luatex')
%% fontspec-api.dtx (with options: `fontspec,luatex')
%% fontspec-internal.dtx (with options: `fontspec,luatex')
+%% fontspec-opentype.dtx (with options: `fontspec,luatex')
+%% fontspec-graphite.dtx (with options: `fontspec,luatex')
%% fontspec-keyval.dtx (with options: `fontspec,luatex')
+%% fontspec-feat-opentype.dtx (with options: `fontspec,luatex')
+%% fontspec-scripts.dtx (with options: `fontspec,luatex')
+%% fontspec-lang.dtx (with options: `fontspec,luatex')
+%% fontspec-feat-aat.dtx (with options: `fontspec,luatex')
+%% fontspec-enc.dtx (with options: `fontspec,luatex')
%% fontspec-math.dtx (with options: `fontspec,luatex')
%% fontspec-closing.dtx (with options: `fontspec,luatex')
-%% fontspec-patches.dtx (with options: `patches')
+%% fontspec-patches.dtx (with options: `fontspec,luatex')
%% ------------------------------------------------
%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% (C) 2004--2017 Will Robertson and Khaled Hosny
%% License information appended.
%% ------------------------------------------------
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/01/02}{2.5c}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -43,30 +50,93 @@
\bool_new:N \g__fontspec_cfg_bool
\bool_new:N \g__fontspec_math_bool
\bool_new:N \g__fontspec_euenc_bool
-\int_new:N \l_fontspec_script_int
-\int_new:N \l_fontspec_language_int
-\int_new:N \l_fontspec_strnum_int
+\bool_new:N \l__fontspec_disable_defaults_bool
+\bool_new:N \l__fontspec_alias_bool
+\bool_new:N \l__fontspec_external_bool
+\bool_new:N \l__fontspec_never_check_bool
+\bool_new:N \l__fontspec_defining_encoding_bool
+\bool_new:N \l__fontspec_script_exist_bool
+\int_new:N \l__fontspec_script_int
+\int_new:N \l__fontspec_language_int
+\int_new:N \l__fontspec_strnum_int
+\int_new:N \l__fontspec_tmp_int
+\int_new:N \l__fontspec_em_int
+\int_new:N \l__fontspec_emdef_int
\fp_new:N \l__fontspec_tmpa_fp
\fp_new:N \l__fontspec_tmpb_fp
\dim_new:N \l__fontspec_tmpa_dim
\dim_new:N \l__fontspec_tmpb_dim
\dim_new:N \l__fontspec_tmpc_dim
-\tl_set:Nx \c_colon_str { \tl_to_str:N : }
-\cs_set:Npn \use_v:nnnnn #1#2#3#4#5 {#5}
-\cs_set:Npn \use_iv:nnnnn #1#2#3#4#5 {#4}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\seq_new:N \g__fontspec_bf_series_seq
+\clist_new:N \g__fontspec_default_fontopts_clist
+\clist_new:N \g__fontspec_all_keyval_modules_clist
+\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
+\prop_new:N \g__fontspec_fontopts_prop
+\prop_new:N \l__fontspec_nfss_prop
+\prop_new:N \l__fontspec_nfssfont_prop
+\prop_new:N \g__fontspec_OT_features_prop
+\prop_new:N \g__fontspec_all_opentype_feature_names_prop
+\prop_new:N \g__fontspec_em_prop
+\tl_new:N \g__fontspec_mathrm_tl
+\tl_new:N \g__fontspec_bfmathrm_tl
+\tl_new:N \g__fontspec_mathsf_tl
+\tl_new:N \g__fontspec_mathtt_tl
+\tl_new:N \l__fontspec_family_label_tl
+\tl_new:N \l__fontspec_fake_slant_tl
+\tl_new:N \l__fontspec_fake_embolden_tl
+\tl_new:N \l__fontspec_fontname_up_tl
+\tl_new:N \l__fontspec_fontname_bf_tl
+\tl_new:N \l__fontspec_fontname_it_tl
+\tl_new:N \l__fontspec_fontname_bfit_tl
+\tl_new:N \l__fontspec_fontname_sl_tl
+\tl_new:N \l__fontspec_fontname_bfsl_tl
+\tl_new:N \l__fontspec_fontname_sc_tl
+\tl_new:N \l__fontspec_fontfeat_up_clist
+\tl_new:N \l__fontspec_fontfeat_bf_clist
+\tl_new:N \l__fontspec_fontfeat_it_clist
+\tl_new:N \l__fontspec_fontfeat_bfit_clist
+\tl_new:N \l__fontspec_fontfeat_sl_clist
+\tl_new:N \l__fontspec_fontfeat_bfsl_clist
+\tl_new:N \l__fontspec_fontfeat_sc_clist
+\tl_new:N \l__fontspec_script_name_tl
+\tl_new:N \l_fontspec_script_tl
+\tl_new:N \l__fontspec_lang_name_tl
+\tl_new:N \l_fontspec_lang_tl
+\tl_new:N \g__fontspec_hexcol_tl
+\tl_new:N \g__fontspec_opacity_tl
+\tl_set:Nn \g__fontspec_hexcol_tl {000000}
+\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
+\cs_new:Nn \__fontspec_keys_set_known:nnN
+ {
+ \keys_set_known:nnN {#1} {#2} #3
+ }
+\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
+\cs_set:Npn \__fontspec_head_ii:n #1 { \__fontspec_head_ii:w #1 *** \q_stop}
+\cs_set:Npn \__fontspec_head_ii:w #1#2#3 \q_stop { #1#2 }
+\cs_generate_variant:Nn \__fontspec_head_ii:n {o}
\cs_new:Nn \__fontspec_int_mult_truncate:Nn
{
\int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
+\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
\cs_new:Npn \__fontspec_warning:n { \msg_warning:nn {fontspec} }
\cs_new:Npn \__fontspec_warning:nx { \msg_warning:nnx {fontspec} }
@@ -75,190 +145,226 @@
\cs_new:Npn \__fontspec_info:nx { \msg_info:nnx {fontspec} }
\cs_new:Npn \__fontspec_info:nxx { \msg_info:nnxx {fontspec} }
\cs_new:Npn \__fontspec_trace:n { \msg_trace:nn {fontspec} }
-\msg_new:nnn {fontspec} {no-size-info}
+\cs_generate_variant:Nn \msg_new:nnn {nnx}
+\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
+\cs_new:Nn \__fontspec_msg_new:nnn
+ { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } }
+\cs_new:Nn \__fontspec_msg_new:nnnn
+ { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } }
+\char_set_catcode_space:n {32}
+\__fontspec_msg_new:nnn {fontspec} {only-inside-encdef}
+ {
+ \exp_not:N#1can only be used in the second argument
+ to \string\DeclareUnicodeEncoding.
+ }
+\__fontspec_msg_new:nnn {fontspec} {only-import-tu}
+ {
+ The "\string\ImportEncoding" command can only take "TU" as an argument at this stage.
+ }
+\__fontspec_msg_new:nnn {fontspec} {no-size-info}
+ {
+ Size information must be supplied.\\
+ For example, SizeFeatures={Size={8-12},...}.
+ }
+\__fontspec_msg_new:nnnn {fontspec} {font-not-found}
+ {
+ The font "#1" cannot be found.
+ }
{
- Size~ information~ must~ be~ supplied.\\
- For~ example,~ SizeFeatures={Size={8-12},...}.
+ A font might not be found for many reasons.\\
+ Check the spelling, where the font is installed etc. etc.\\\\
+ When in doubt, ask someone for help!
}
-\msg_new:nnnn {fontspec} {font-not-found}
+\__fontspec_msg_new:nnnn {fontspec} {rename-feature-not-exist}
{
- The~ font~ "#1"~ cannot~ be~ found.
+ The feature #1 doesn't appear to be defined.
}
{
- A~font~might~not~be~found~for~many~reasons.\\
- Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\
- When~in~doubt,~ask~someone~for~help!
+ It looks like you're trying to rename a feature that doesn't exist.
}
-\msg_new:nnnn {fontspec} {rename-feature-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {no-glyph}
{
- The~ feature~ #1~ doesn't~ appear~ to~ be~ defined.
+ '\l_fontspec_fontname_tl' does not contain glyph #1.
}
+\__fontspec_msg_new:nnnn {fontspec} {euler-too-late}
{
- It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist.
+ The euler package must be loaded BEFORE fontspec.
}
-\msg_new:nnn {fontspec} {no-glyph}
{
- '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1.
+ fontspec only overwrites euler's attempt to
+ define the maths text fonts if fontspec is
+ loaded after euler. Type <return> to proceed
+ with incorrect \string\mathit, \string\mathbf, etc.
}
-\msg_new:nnnn {fontspec} {euler-too-late}
+\__fontspec_msg_new:nnnn {fontspec} {no-xcolor}
{
- The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec.
+ Cannot load named colours without the xcolor package.
}
{
- fontspec~ only~ overwrites~ euler's~ attempt~ to~
- define~ the~ maths~ text~ fonts~ if~ fontspec~ is~
- loaded~ after~ euler.~ Type~ <return>~ to~ proceed~
- with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc.
+ Sorry, I can't do anything to help. Instead of loading
+ the color package, use xcolor instead.
}
-\msg_new:nnnn {fontspec} {no-xcolor}
+\__fontspec_msg_new:nnnn {fontspec} {unknown-color-model}
{
- Cannot~ load~ named~ colours~ without~ the~ xcolor~ package.
+ Error loading colour `#1'; unknown colour model.
}
{
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~
- the~ color~ package,~ use~ xcolor~ instead.~ It's~ better.
+ Sorry, I can't do anything to help. Please report this error
+ to my developer with a minimal example that causes the problem.
}
-\msg_new:nnnn {fontspec} {unknown-color-model}
+\__fontspec_msg_new:nnnn {fontspec} {not-in-addfontfeatures}
{
- Error~ loading~ colour~ `#1';~ unknown~ colour~ model.
+ The "#1" font feature cannot be used in \string\addfontfeatures.
}
{
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~
- to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem.
+ This is due to how TeX loads fonts; such settings
+ are global so adding them mid-document within a group causes
+ confusion. You'll need to define multiple font families to achieve
+ what you want.
}
-\msg_new:nnnn {fontspec} {not-in-addfontfeatures}
+\__fontspec_msg_new:nnn {fontspec} {tu-clash}
{
- The~ "#1"~ font~ feature~ cannot~ be~ used~ in~ \string\addfontfeatures.
+ I have found the tuenc.def encoding definition file but the TU encoding is not
+ defined by the LaTeX2e kernel; attempting to correct but you really should update
+ to the latest version of LaTeX2e.
}
+\__fontspec_msg_new:nnn {fontspec} {tu-missing}
{
- This~ is~ due~ to~ how~ TeX~ loads~ fonts;~ such~ settings~
- are~ global~ so~ adding~ them~ mid-document~ within~ a~ group~ causes~
- confusion.~ You'll~ need~ to~ define~ multiple~ font~ families~ to~ achieve~
- what~ you~ want.
+ The TU encoding seems to be missing; please update to the latest version of LaTeX2e.
}
-\msg_new:nnn {fontspec} {addfontfeatures-ignored}
+\__fontspec_msg_new:nnn {fontspec} {addfontfeatures-ignored}
{
- \string\addfontfeature (s)~ ignored~ \msg_line_context:;~
- it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ a~ fontspec~ command.\\
+ \string\addfontfeature (s) ignored \msg_line_context:;
+ it cannot be used with a font that wasn't selected by a fontspec command.\\
\\
- The~ current~ font~ is~ "\use:c{font@name}".\\
+ The current font is "\use:c{font@name}".\\
\int_compare:nTF { \clist_count:n {#1} = 1 }
- { The~ requested~ feature~ is~ "#1". }
- { The~ requested~ features~ are~ "#1". }
+ { The requested feature is "#1". }
+ { The requested features are "#1". }
+ }
+\__fontspec_msg_new:nnn {fontspec} {feature-option-overwrite}
+ {
+ Option '#2' of font feature '#1' overwritten.
}
-\msg_new:nnn {fontspec} {feature-option-overwrite}
+\__fontspec_msg_new:nnn {fontspec} {script-not-exist-latn}
{
- Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten.
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
+ 'Latin' script used instead.
}
-\msg_new:nnn {fontspec} {script-not-exist-latn}
+\__fontspec_msg_new:nnn {fontspec} {script-not-exist}
{
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\
- 'Latin'~ script~ used~ instead.
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.
}
-\msg_new:nnn {fontspec} {script-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {aat-feature-not-exist}
{
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for AAT font '\l_fontspec_fontname_tl'.
}
-\msg_new:nnn {fontspec} {aat-feature-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
{
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ AAT~ font~ '\l_fontspec_fontname_tl'.
+ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ in font '\l_fontspec_fontname_tl'.
}
-\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+\__fontspec_msg_new:nnn {fontspec} {icu-feature-not-exist}
{
- AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- in~ font~ '\l_fontspec_fontname_tl'.
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for OpenType font '\l_fontspec_fontname_tl'
}
-\msg_new:nnn {fontspec} {icu-feature-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
{
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ OpenType~ font~ '\l_fontspec_fontname_tl'
+ OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l__fontspec_script_name_tl' and language '\l__fontspec_lang_name_tl'.
}
-\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+\__fontspec_msg_new:nnn {fontspec} {no-opticals}
{
- OpenType~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'~ and~ language~ '\l__fontspec_lang_name_tl'.
+ '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis.
}
-\msg_new:nnn {fontspec} {no-opticals}
+\__fontspec_msg_new:nnn {fontspec} {language-not-exist}
{
- '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis.
+ Language '#1' not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l__fontspec_script_name_tl'.\\
+ 'Default' language used instead.
}
-\msg_new:nnn {fontspec} {language-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {only-xetex-feature}
{
- Language~ '#1'~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'.\\
- 'Default'~ language~ used~ instead.
+ Ignored XeTeX only feature: '#1'.
}
-\msg_new:nnn {fontspec} {only-xetex-feature}
+\__fontspec_msg_new:nnn {fontspec} {only-luatex-feature}
{
- Ignored~ XeTeX~ only~ feature:~ '#1'.
+ Ignored LuaTeX only feature: '#1'.
}
-\msg_new:nnn {fontspec} {only-luatex-feature}
+\__fontspec_msg_new:nnn {fontspec} {no-mapping}
{
- Ignored~ LuaTeX~ only~ feature:~ '#1'.
+ Input mapping not (yet?) supported in LuaTeX.
}
-\msg_new:nnn {fontspec} {no-mapping}
+\__fontspec_msg_new:nnn {fontspec} {no-mapping-ligtex}
{
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.
+ Input mapping not (yet?) supported in LuaTeX.\\
+ Use "Ligatures=TeX" instead of "Mapping=tex-text".
}
-\msg_new:nnn {fontspec} {no-mapping-ligtex}
+\__fontspec_msg_new:nnn {fontspec} {cm-default-obsolete}
{
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\
- Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text".
+ The "cm-default" package option is obsolete.
}
-\msg_new:nnn {fontspec} {cm-default-obsolete}
+\__fontspec_msg_new:nnn {fontspec} {fakebold-only-xetex}
{
- The~ "cm-default"~ package~ option~ is~ obsolete.
+ The "FakeBold" and "AutoFakeBold" options are only available with XeLaTeX.\\
+ Option ignored.
}
-\msg_new:nnn {fontspec} {fakebold-only-xetex}
+\__fontspec_msg_new:nnn {fontspec} {font-index-needs-ttc}
{
- The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
- Option~ ignored.
+ The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
+ Feature ignored.
}
-\msg_new:nnn {fontspec} {defining-font}
+\__fontspec_msg_new:nnn {fontspec} {feat-cannot-remove}
{
- Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
- with~ options~ [\l__fontspec_all_features_clist].\\
+ The "#1" feature cannot be deactivated. Request ignored.
+ }
+\__fontspec_msg_new:nnn {fontspec} {defining-font}
+ {
+ Font family '\l_fontspec_family_tl' created for font '#2'
+ with options [\l__fontspec_all_features_clist].\\
\\
- This~ font~ family~ consists~ of~ the~ following~ NFSS~ series/shapes:\\
+ This font family consists of the following NFSS series/shapes:\\
\l_fontspec_defined_shapes_tl
}
-\msg_new:nnn {fontspec} {no-font-shape}
+\__fontspec_msg_new:nnn {fontspec} {no-font-shape}
{
- Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist).
+ Could not resolve font "#1" (it probably doesn't exist).
}
-\msg_new:nnn {fontspec} {set-scale}
+\__fontspec_msg_new:nnn {fontspec} {set-scale}
{
- \l_fontspec_fontname_tl\space scale ~=~ \l__fontspec_scale_tl.
+ \l_fontspec_fontname_tl\space scale = \l__fontspec_scale_tl.
}
-\msg_new:nnn {fontspec} {setup-math}
+\__fontspec_msg_new:nnn {fontspec} {setup-math}
{
- Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this).
+ Adjusting the maths setup (use [no-math] to avoid this).
}
-\msg_new:nnn {fontspec} {no-scripts}
+\__fontspec_msg_new:nnn {fontspec} {no-scripts}
{
- Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information.
+ Font "\l_fontspec_fontname_tl" does not contain any OpenType `Script' information.
}
-\msg_new:nnn {fontspec} {opa-twice}
+\__fontspec_msg_new:nnn {fontspec} {opa-twice}
{
- Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\
- Using~ specification~ "Opacity=#1".
+ Opacity set twice, in both Colour and Opacity.\\
+ Using specification "Opacity=#1".
}
-\msg_new:nnn {fontspec} {opa-twice-col}
+\__fontspec_msg_new:nnn {fontspec} {opa-twice-col}
{
- Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\
- Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF".
+ Opacity set twice, in both Opacity and Colour.\\
+ Using an opacity specification in hex of "#1/FF".
}
-\msg_new:nnn {fontspec} {bad-colour}
+\__fontspec_msg_new:nnn {fontspec} {bad-colour}
{
- Bad~ colour~ declaration~ "#1".~
- Colour~ must~ be~ one~ of:\\
- *~ a~ named~ xcolor~ colour\\
- *~ a~ six-digit~ hex~ colour~ RRGGBB\\
- *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity
+ Bad colour declaration "#1".
+ Colour must be one of:\\
+ * a named xcolor colour\\
+ * a six-digit hex colour RRGGBB\\
+ * an eight-digit hex colour RRGGBBTT with opacity
}
+\char_set_catcode_ignore:n {32}
\DeclareOption{cm-default}
{ \__fontspec_warning:n {cm-default-obsolete} }
\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
@@ -277,20 +383,35 @@
\msg_redirect_module:nnn { fontspec } { warning } { none }
\msg_redirect_module:nnn { fontspec } { info } { none }
}
-\ExecuteOptions{config,math,euenc}
+\ExecuteOptions{config,math,tuenc}
\ProcessOptions*
-\tl_set:Nn \g_fontspec_encoding_tl {TU}
-\file_if_exist:nF {tuenc.def} { \bool_set_true:N \g__fontspec_euenc_bool }
-\bool_if:NT \g__fontspec_euenc_bool
+\bool_if:NF \g__fontspec_euenc_bool
+ {
+ \file_if_exist:nTF {tuenc.def}
+ {
+ \cs_if_exist:cF {T@TU}
+ {
+ \__fontspec_warning:n {tu-clash}
+ \DeclareFontEncoding{TU}{}{}
+ \DeclareFontSubstitution{TU}{lmr}{m}{n}
+ }
+ }
+ {
+ \__fontspec_warning:n {tu-missing}
+ \bool_set_true:N \g__fontspec_euenc_bool
+ }
+ }
+\bool_if:NTF \g__fontspec_euenc_bool
{
\tl_set:Nn \g_fontspec_encoding_tl {EU2}
}
+ { \tl_set:Nn \g_fontspec_encoding_tl { TU } }
\tl_set:Nn \rmdefault {lmr}
\tl_set:Nn \sfdefault {lmss}
\tl_set:Nn \ttdefault {lmtt}
\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
-\normalsize % to overcome the encoding changing the current font size
+\tl_if_in:NnT \@filelist {.cls} { \normalsize }
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
@@ -306,23 +427,19 @@
\cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
}
-\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
\font #1 = #2 ~at~ #3 \scan_stop:
}
-
\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
{
\global \font #1 = #2 ~at~ #3 \scan_stop:
}
-
\cs_set:Npn \__fontspec_font_suppress_not_found_error:
{
\int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
}
-
-\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+\prg_set_conditional:Nnn \__fontspec_primitive_font_if_null:N {p,TF,T,F}
{
\ifx #1 \nullfont
\prg_return_true:
@@ -330,102 +447,95 @@
\prg_return_false:
\fi
}
-\cs_new:Nn \__fontspec_font_set:Nnn
- {
- \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\cs_new:Nn \__fontspec_font_gset:Nnn
- {
- \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
- {
- \etex_iffontchar:D #1 #2 \scan_stop:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\cs_new:Nn \__fontspec_pass_args:nnn
- {
- \IfNoValueTF {#2}
- { \__fontspec_post_arg:w {#1} {#3} }
- { #1 {#2} {#3} }
- }
-\NewDocumentCommand \__fontspec_post_arg:w { m m O{} }
- { #1 {#3} {#2} }
-\NewDocumentCommand \fontspec { o m }
- { \__fontspec_pass_args:nnn \__fontspec_fontspec:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_fontspec:nn
+\prg_set_conditional:Nnn \__fontspec_primitive_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_primitive_font_set:Nnn \l__fontspec_primitive_font {#1} {10pt}
+ \__fontspec_primitive_font_if_null:NTF \l__fontspec_primitive_font
+ { \group_end: \prg_return_false: }
+ { \group_end: \prg_return_true: }
+ }
+\prg_new_conditional:Nnn \__fontspec_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
+ {
+ \etex_iffontchar:D #1 #2 \scan_stop:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\NewDocumentCommand \fontspec { O{} m O{} }
{
- \fontspec_set_family:Nnn \f@family {#1} {#2}
+ \fontspec_set_family:Nnn \f@family {#1,#3} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
-\DeclareDocumentCommand \setmainfont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmainfont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmainfont:nn
+\DeclareDocumentCommand \setmainfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \rmdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
-
-\DeclareDocumentCommand \setsansfont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setsansfont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setsansfont:nn
+\DeclareDocumentCommand \setsansfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \sfdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_sffamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
-
-\DeclareDocumentCommand \setmonofont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmonofont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmonofont:nn
+\DeclareDocumentCommand \setmonofont { O{} m O{} }
{
- \fontspec_set_family:Nnn \ttdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
\cs_set_eq:NN \setromanfont \setmainfont
-\tl_new:N \g__fontspec_mathrm_tl
-\tl_new:N \g__fontspec_bfmathrm_tl
-\tl_new:N \g__fontspec_mathsf_tl
-\tl_new:N \g__fontspec_mathtt_tl
-\DeclareDocumentCommand \setmathrm { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathrm:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathrm:nn
+\DeclareDocumentCommand \setmathrm { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2}
}
-\DeclareDocumentCommand \setboldmathrm { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setboldmathrm:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setboldmathrm:nn
+\DeclareDocumentCommand \setboldmathrm { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2}
}
-\DeclareDocumentCommand \setmathsf { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathsf:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathsf:nn
+\DeclareDocumentCommand \setmathsf { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
}
-\DeclareDocumentCommand \setmathtt { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathtt:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathtt:nn
+\DeclareDocumentCommand \setmathtt { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
}
@@ -436,12 +546,9 @@
\tl_set:Nn \g__fontspec_mathrm_tl {\rmdefault}
\tl_set:Nn \g__fontspec_mathsf_tl {\sfdefault}
\tl_set:Nn \g__fontspec_mathtt_tl {\ttdefault}
-\DeclareDocumentCommand \newfontfamily { m o m }
- { \__fontspec_pass_args:nnn { \__fontspec_newfontfamily:Nnn #1 } {#2} {#3} }
-
-\cs_new:Nn \__fontspec_newfontfamily:Nnn
+\DeclareDocumentCommand \newfontfamily { m O{} m O{} }
{
- \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2} {#3}
+ \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -452,15 +559,10 @@
}
}
}
-\DeclareDocumentCommand \newfontface { m o m }
- { \__fontspec_pass_args:nnn { \__fontspec_newfontface:Nnn #1 } {#2} {#3} }
-
-\cs_new:Nn \__fontspec_newfontface:Nnn
+\DeclareDocumentCommand \newfontface { m O{} m O{} }
{
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
}
-\clist_new:N \g__fontspec_default_fontopts_clist
-\prop_new:N \g__fontspec_fontopts_prop
\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
{
\IfNoValueTF {#2}
@@ -495,20 +597,6 @@
}
}
}
-\cs_new:Nn \__fontspec_sanitise_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_remove_all:Nn #1 {~}
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \tl_if_in:NnT #1 {##1}
- {
- \tl_remove_once:Nn #1 {##1}
- \clist_map_break:
- }
- }
- }
-\bool_new:N \l__fontspec_disable_defaults_bool
\DeclareDocumentCommand \addfontfeatures {m}
{
\fontspec_if_fontspec_font:TF
@@ -520,7 +608,7 @@
\bool_set_true:N \l__fontspec_disable_defaults_bool
\use:x
{
- \exp_not:N \fontspec_select:nn
+ \__fontspec_select_font_family:nn
{ \l__fontspec_options_tl , #1 } {\l__fontspec_fontname_tl}
}
\group_end:
@@ -545,49 +633,57 @@
\DeclareDocumentCommand \newAATfeature {mmmm}
{
\keys_if_exist:nnF { fontspec } {#1}
- { \__fontspec_define_font_feature:n {#1} }
+ { \__fontspec_define_aat_feature_group:n {#1} }
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \__fontspec_define_feature_option:nnnnn {#1}{#2}{#3}{#4}{}
+ \__fontspec_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
}
\DeclareDocumentCommand \newopentypefeature {mmm}
{
\keys_if_exist:nnF { fontspec / options } {#1}
- { \__fontspec_define_font_feature:n {#1} }
+ { \__fontspec_define_opentype_feature_group:n {#1} }
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \__fontspec_define_feature_option:nnnnn {#1}{#2}{}{}{#3}
+ \__fontspec_define_opentype_feature:nnn {#1}{#2}{#3}
}
\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
-\bool_new:N \l__fontspec_alias_bool
\DeclareDocumentCommand \aliasfontfeature {mm}
{
\bool_set_false:N \l__fontspec_alias_bool
\clist_map_inline:nn
- { fontspec, fontspec-preparse, fontspec-preparse-external,
+ { fontspec, fontspec-opentype, fontspec-aat, fontspec-preparse, fontspec-preparse-external,
fontspec-preparse-nested, fontspec-renderer }
{
\keys_if_exist:nnT {##1} {#1}
{
\bool_set_true:N \l__fontspec_alias_bool
- \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
+ \keys_define:nn {##1}
+ { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
}
}
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
+\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \bool_set_false:N \l__fontspec_alias_bool
-\cs_set:Nn \__fontspec_alias_font_feature:nnn
- {
- \keys_define:nn {#1}
- { #3 .code:n = { \keys_set:nn {#1} { #2 = {##1} } } }
- }
+ \clist_map_inline:Nn \g__fontspec_all_keyval_modules_clist
+ {
-\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
- { \keys_define:nn { fontspec / #1 } { #3 .meta:n = {#2} } }
+ \keys_if_exist:nnT {##1} {#1}
+ {
+ \bool_set_true:N \l__fontspec_alias_bool
+ \keys_define:nn { ##1 / #1 } { #3 .meta:n = {#2} }
+ }
+ }
+
+ \bool_if:NF \l__fontspec_alias_bool
+ { \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
+ }
\DeclareDocumentCommand \newfontscript {mm}
{
\fontspec_new_script:nn {#1} {#2}
@@ -603,6 +699,31 @@
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+\DeclareDocumentCommand \IfFontFeatureActiveTF {mmm}
+ {
+ \__fontspec_if_font_feature:nTF {#1} {#2} {#3}
+ }
+\prg_new_conditional:Nnn \__fontspec_if_font_feature:n {TF}
+ {
+ \tl_gclear:N \g__fontspec_single_feat_tl
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_init:
+ \bool_set_true:N \l__fontspec_ot_bool
+ \bool_set_true:N \l__fontspec_never_check_bool
+ \bool_set_false:N \l__fontspec_firsttime_bool
+ \clist_clear:N \l__fontspec_fontfeat_clist
+ \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist {#1}
+ \group_end:
+
+
+ \tl_if_empty:NTF \g__fontspec_single_feat_tl { \prg_return_false: }
+ {
+ \exp_args:NV \fontspec_if_current_feature:nTF \g__fontspec_single_feat_tl
+ { \prg_return_true: } { \prg_return_false: }
+ }
+ }
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
\cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
@@ -612,10 +733,10 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\bool_if:NTF \l__fontspec_atsui_bool
{
- \fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
\prg_return_true: \prg_return_false:
}
{
@@ -631,7 +752,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool \prg_return_true: \prg_return_false:
}
@@ -644,20 +765,20 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_script_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_language_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \__fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -672,13 +793,13 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
- \fontspec_iv_str_to_num:Nn \l_fontspec_script_int {#1}
- \fontspec_iv_str_to_num:Nn \l_fontspec_language_int {#2}
- \fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
+ \__fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -689,11 +810,11 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
- \fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -704,15 +825,15 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_script_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -723,13 +844,13 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
- \fontspec_iv_str_to_num:Nn \l_fontspec_script_int {#1}
- \fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
+ \__fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -740,7 +861,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
@@ -757,7 +878,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
@@ -772,48 +893,104 @@
\cs_new:Nn \fontspec_set_family:Nnn
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
- \fontspec_select:nn {#2}{#3}
+ \__fontspec_select_font_family:nn {#2}{#3}
\tl_set_eq:NN #1 \l_fontspec_family_tl
}
\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
\cs_new:Nn \fontspec_set_fontface:NNnn
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
- \fontspec_select:nn {#3}{#4}
+ \__fontspec_select_font_family:nn {#3}{#4}
\tl_set_eq:NN #1 \l_fontspec_font
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
-\cs_set:Nn \fontspec_select:nn
+\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \__fontspec_init:
+ \__fontspec_if_detect_external:nT {#1} { \__fontspec_font_is_file: }
+ \__fontspec_primitive_font_if_exist:nTF { \__fontspec_construct_font_call:nn {#1} {} }
+ { \group_end: \prg_return_true: }
+ { \group_end: \prg_return_false: }
+ }
+\cs_set_eq:NN \IfFontExistsTF \fontspec_font_if_exist:nTF
+
+\prg_new_conditional:Nnn \fontspec_if_current_feature:n {TF,T,F}
+ {
+ \exp_args:Nxx \tl_if_in:nnTF
+ { \fontname\font } { \tl_to_str:n {#1} }
+ { \prg_return_true: } { \prg_return_false: }%
+ }
+
+\cs_new_protected:Nn \__fontspec_select_font_family:nn
{
\group_begin:
\__fontspec_font_suppress_not_found_error:
\__fontspec_init:
- \tl_set:Nx \l_fontspec_fontname_tl {#2}
- \tl_set:Nx \l_fontspec_fontname_up_tl {#2}
- \tl_set:Nx \l__fontspec_basename_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
+
+ \__fontspec_if_detect_external:nT {#2}
+ { \keys_set:nn {fontspec-preparse-external} {Path} }
+ \__fontspec_init_ttc:n {#2}
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+
\__fontspec_extract_all_features:n {#1}
- \__fontspec_preparse_features:
+ \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
+
+ \__fontspec_preparse_features:
\__fontspec_load_font:
\__fontspec_set_scriptlang:
\__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist {}
\bool_set_false:N \l__fontspec_firsttime_bool
- \__fontspec_save_family:nTF {#2}
+ \__fontspec_save_family_needed:nTF {#2}
{
- \__fontspec_save_fontinfo:
- \__fontspec_find_autofonts:
- \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
- \__fontspec_set_faces:
- \__fontspec_info:nxx {defining-font} {#1} {#2}
+ \__fontspec_save_family:nn {#1} {#2}
}
{
}
\group_end:
}
+\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn
+\cs_new:Nn \__fontspec_sanitise_fontname:Nn
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_remove_all:Nn #1 {~}
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \tl_set:Nn \l__fontspec_extension_tl {##1}
+ \clist_map_break:
+ }
+ }
+ }
+\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
+ {
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \bool_set_false:N \l__fontspec_tmpa_bool
+ \exp_args:Nx % <- this should be handled earlier
+ \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
+ { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
+ }
+ \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ }
+\cs_new:Nn \__fontspec_init_ttc:n
+ {
+ \str_if_eq_x:nnT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ {
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
+ }
\cs_new:Nn \__fontspec_load_external_fontoptions:Nn
{
\__fontspec_sanitise_fontname:Nn #1 {#2}
@@ -847,64 +1024,68 @@
#1
}
}
- \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
}
\cs_new:Nn \__fontspec_preparse_features:
{
- \__fontspec_if_detect_external:VT \l__fontspec_basename_tl
- { \keys_set:nn {fontspec-preparse-external} {ExternalLocation} }
- \keys_set_known:nxN {fontspec-preparse-external}
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
{ \l__fontspec_all_features_clist }
\l__fontspec_keys_leftover_clist
- \tl_set_eq:NN \l_fontspec_fontname_tl \l_fontspec_fontname_up_tl
- \keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
+
+ \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
\l__fontspec_keys_leftover_clist
- \keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
+ \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
\l__fontspec_fontfeat_clist
}
\cs_new:Nn \__fontspec_load_font:
{
- \__fontspec_font_set:Nnn \l_fontspec_font
- { \__fontspec_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
- \__fontspec_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l_fontspec_fontname_up_tl} }
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
\__fontspec_set_font_type:
- \__fontspec_font_gset:Nnn \l_fontspec_font
- { \__fontspec_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
+ \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
}
-\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
+\cs_set:Nn \__fontspec_construct_font_call:nnnnnn
{
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \bool_set_false:N \l__fontspec_tmpa_bool
- \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
- { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
- }
- \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ " \__fontspec_fontname_wrap:n { #1 #2 #3 } #4 #5
+ \str_if_eq_x:nnF {#6}{} {:#6} "
}
-\cs_generate_variant:Nn \__fontspec_if_detect_external:nT {V}
-\cs_set:Nn \__fontspec_fullname:n
+\cs_set:Nn \__fontspec_construct_font_call:nn
{
- \__fontspec_namewrap:n { #1 \l__fontspec_extension_tl }
- \l_fontspec_renderer_tl
- \l__fontspec_optical_size_tl
+ \__fontspec_construct_font_call:nnnnnn
+ {#1}
+ \l__fontspec_extension_tl
+ \l__fontspec_ttc_index_tl
+ \l_fontspec_renderer_tl
+ \l__fontspec_optical_size_tl
+ {#2}
}
+\cs_new:Nn \__fontspec_font_is_name:
+ {
+ \cs_set_eq:NN \__fontspec_fontname_wrap:n \use:n
+ }
+\cs_new:Nn \__fontspec_font_is_file:
+ {
+ \cs_set:Npn \__fontspec_fontname_wrap:n ##1 { file:\l__fontspec_font_path_tl ##1 }
+ }
\cs_new:Nn \__fontspec_set_scriptlang:
{
\bool_if:NT \l__fontspec_firsttime_bool
{
\tl_if_empty:NTF \l__fontspec_script_name_tl
{
- \fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:nTF {latn}
{
\tl_set:Nn \l__fontspec_script_name_tl {Latin}
\tl_if_empty:NT \l__fontspec_lang_name_tl
{
\tl_set:Nn \l__fontspec_lang_name_tl {Default}
}
- \keys_set:nx {fontspec} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec} {Language=\l__fontspec_lang_name_tl}
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
}
{
\__fontspec_info:n {no-scripts}
@@ -915,13 +1096,29 @@
{
\tl_set:Nn \l__fontspec_lang_name_tl {Default}
}
- \keys_set:nx {fontspec} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec} {Language=\l__fontspec_lang_name_tl}
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
}
}
}
-\prg_new_conditional:Nnn \__fontspec_save_family:n {TF}
+\cs_set:Nn \__fontspec_get_features:Nn
+ {
+ \__fontspec_init_fontface:
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#2}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
+ \keys_set:nx {fontspec-opentype} {\l__fontspec_keys_leftover_clist}
+
+ \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
+ { \g__fontspec_hexcol_tl \g__fontspec_opacity_tl }
+ { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
+
+ \tl_set_eq:NN #1 \l__fontspec_rawfeatures_sclist
+ }
+\prg_new_conditional:Nnn \__fontspec_save_family_needed:n {TF}
{
+
+
\cs_if_exist:NT \l__fontspec_nfss_fam_tl
{
\cs_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
@@ -945,51 +1142,58 @@
\cs_if_exist:cTF {g__fontspec_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
-\cs_new:Nn \__fontspec_save_fontinfo:
+\cs_new:Nn \__fontspec_save_family:nn
+ {
+ \__fontspec_save_fontinfo:n {#2}
+ \__fontspec_find_autofonts:
+ \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
+ \__fontspec_set_faces:
+ \__fontspec_info:nxx {defining-font} {#1} {#2}
+ }
+\cs_new:Nn \__fontspec_save_fontinfo:n
{
\prop_new:c {g__fontspec_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { \l__fontspec_basename_tl }
+ \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { #1 }
\prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
\prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontdef}
{
- \__fontspec_fullname:n {\l_fontspec_fontname_tl} :
- \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist
+ \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
+ { \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l_fontspec_script_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l_fontspec_language_int
+ \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
\prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
\prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
-
}
\cs_new:Nn \__fontspec_find_autofonts:
{
\bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_it_tl} {/B}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_bf_tl} {/I}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
}
\bool_if:NF \l__fontspec_nobf_bool
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
}
\bool_if:NF \l__fontspec_noit_bool
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfsl_tl {\l_fontspec_fontname_sl_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
}
\cs_new:Nn \__fontspec_set_faces:
{
\__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
\prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
}
@@ -998,11 +1202,30 @@
\fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
\__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
}
+\cs_set:Nn \fontspec_complete_fontname:Nn
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
+ \tl_remove_all:Nn #1 {~}
+ }
+\cs_new:Nn \__fontspec_add_nfssfont:nnnn
+ {
+ \tl_set:Nx \l__fontspec_this_font_tl {#3}
+
+ \tl_if_empty:xTF {#4}
+ { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
+ { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
+
+ \tl_if_empty:NF \l__fontspec_this_font_tl
+ {
+ \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
+ { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
+ }
+ }
\cs_new:Nn \__fontspec_set_font_type:
{
\bool_set_true:N \l__fontspec_ot_bool
}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
\cs_new:Nn \__fontspec_set_autofont:Nnn
{
\bool_if:NF \l__fontspec_external_bool
@@ -1021,8 +1244,8 @@
\prg_new_conditional:Nnn \__fontspec_if_autofont:nn {T,TF}
{
- \__fontspec_font_set:Nnn \l_tmpa_font { \__fontspec_fullname:n {#1} } {\f@size pt}
- \__fontspec_font_set:Nnn \l_tmpb_font { \__fontspec_fullname:n {#1#2} } {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f@size pt}
\str_if_eq_x:nnTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
{ \prg_return_false: }
{ \prg_return_true: }
@@ -1030,7 +1253,7 @@
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
{
\group_begin:
- \keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
\__fontspec_load_fontname:n {#1}
\__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
\group_end:
@@ -1041,8 +1264,8 @@
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
\prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
{ \clist_clear:N \l__fontspec_fontopts_clist }
- \__fontspec_font_set:Nnn \l_fontspec_font {\__fontspec_fullname:n {\l_fontspec_fontname_tl}} {\f@size pt}
- \__fontspec_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font { \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f@size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
}
\cs_new:Nn \__fontspec_declare_shape:nnnn
{
@@ -1050,25 +1273,33 @@
\tl_clear:N \l__fontspec_nfss_sc_tl
\tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
- \exp_args:Nx \clist_map_inline:nn {#4}
- {
+ \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
+
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
+ }
+\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
+\cs_new:Nn \__fontspec_setup_single_size:nn
+ {
\tl_clear:N \l__fontspec_size_tl
\tl_set_eq:NN \l__fontspec_sizedfont_tl \l__fontspec_saved_fontname_tl % in case not spec'ed
- \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n ##1 }
+ \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n #2 }
\l__fontspec_sizing_leftover_clist
\tl_if_empty:NT \l__fontspec_size_tl { \__fontspec_error:n {no-size-info} }
% "normal"
\__fontspec_load_fontname:n {\l__fontspec_sizedfont_tl}
- \__fontspec_setup_nfss:Nnn \l__fontspec_nfss_tl {#3} {}
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_tl {#1} {\l__fontspec_sizing_leftover_clist} {}
% small caps
\clist_set_eq:NN \l__fontspec_fontfeat_curr_clist \l__fontspec_fontfeat_sc_clist
\bool_if:NF \l__fontspec_nosc_bool
{
- \tl_if_empty:NTF \l_fontspec_fontname_sc_tl
+ \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
{
\__fontspec_make_smallcaps:TF
{
@@ -1078,60 +1309,47 @@
\bool_set_true:N \l__fontspec_nosc_bool
}
}
- { \__fontspec_load_fontname:n {\l_fontspec_fontname_sc_tl} }% local for each size
+ { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
}
\bool_if:NF \l__fontspec_nosc_bool
{
- \__fontspec_setup_nfss:Nnn \l__fontspec_nfss_sc_tl {#3} {\l__fontspec_fontfeat_curr_clist}
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
+ {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
}
-
- }
-
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nn {#1} {#2}
- }
-\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
-
-\cs_new:Nn \__fontspec_setup_nfss:Nnn
+ }
+\cs_new:Nn \__fontspec_setup_nfss:Nnnn
{
- \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist
- { #2 , \l__fontspec_sizing_leftover_clist , #3 }
+
+ \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist { #2 , #3 , #4 }
\tl_put_right:Nx #1
{
<\l__fontspec_size_tl> \l__fontspec_scale_tl
- \__fontspec_fontwrap:n
- {
- \__fontspec_fullname:n { \l_fontspec_fontname_tl }
- : \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist
- }
+ \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
+ { \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
}
-
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
{
\__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl}
{#1} {#2} {\l__fontspec_nfss_tl}{\l__fontspec_postadjust_tl}
}
-
\cs_new:Nn \__fontspec_declare_shapes_smcaps:nn
{
- \bool_if:NF \l__fontspec_nosc_bool
+ \tl_if_empty:NF \l__fontspec_nfss_sc_tl
{
\__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl} {#1}
{ \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
}
+
\cs_new:Nn \__fontspec_combo_sc_shape:n
{
\tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
{ \tl_use:c { \__fontspec_shape_merge:nn {#1} {\scdefault} } }
{ \scdefault }
}
-
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
{
\group_begin:
@@ -1157,6 +1375,7 @@
{
\tl_gput_right:Nx \l_fontspec_defined_shapes_tl
{
+ \exp_not:n { \\ }
-~ \exp_not:N \str_case:nn {#1/#2}
{
{\mddefault/\updefault} {'normal'~}
@@ -1186,7 +1405,6 @@
}
}
}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
\clist_set:Nn \l__fontspec_pre_feat_sclist
{
mode = \l_fontspec_mode_tl ;
@@ -1196,187 +1414,59 @@
language = \l_fontspec_lang_tl ;
}
}
-\cs_set:Nn \__fontspec_get_features:Nn
+\cs_set:Nn \__fontspec_make_smallcaps:TF
{
- \sclist_clear:N \l__fontspec_rawfeatures_sclist
- \tl_clear:N \l__fontspec_scale_tl
- \tl_set_eq:NN \l__fontspec_opacity_tl \g__fontspec_opacity_tl
- \tl_set_eq:NN \l__fontspec_hexcol_tl \g__fontspec_hexcol_tl
- \tl_set_eq:NN \l__fontspec_postadjust_tl \g__fontspec_postadjust_tl
- \tl_clear:N \l__fontspec_wordspace_adjust_tl
- \tl_clear:N \l__fontspec_punctspace_adjust_tl
-
- \keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#2}
- \l__fontspec_keys_leftover_clist
- \keys_set:nx {fontspec} {\l__fontspec_keys_leftover_clist}
- \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
- { \g__fontspec_hexcol_tl \g__fontspec_opacity_tl }
- {
- \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl }
- }
-
- \tl_set_eq:NN #1 \l__fontspec_rawfeatures_sclist
+ \__fontspec_check_ot_feat:nTF {smcp} {#1} {#2}
}
-\tl_clear:N \l__fontspec_family_label_tl
-\tl_clear:N \l_fontspec_fontname_bf_tl
-\tl_clear:N \l_fontspec_fontname_it_tl
-\tl_clear:N \l_fontspec_fake_slant_tl
-\tl_clear:N \l_fontspec_fake_embolden_tl
-\tl_clear:N \l_fontspec_fontname_bfit_tl
-\tl_clear:N \l_fontspec_fontname_sl_tl
-\tl_clear:N \l_fontspec_fontname_bfsl_tl
-\tl_clear:N \l_fontspec_fontname_sc_tl
-\tl_clear:N \l__fontspec_fontfeat_up_clist
-\tl_clear:N \l__fontspec_fontfeat_bf_clist
-\tl_clear:N \l__fontspec_fontfeat_it_clist
-\tl_clear:N \l__fontspec_fontfeat_bfit_clist
-\tl_clear:N \l__fontspec_fontfeat_sl_clist
-\tl_clear:N \l__fontspec_fontfeat_bfsl_clist
-\tl_clear:N \l__fontspec_fontfeat_sc_clist
-\tl_clear:N \l__fontspec_script_name_tl
-\tl_clear:N \l_fontspec_script_tl
-\tl_clear:N \l__fontspec_lang_name_tl
-\tl_clear:N \l_fontspec_lang_tl
-\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
-
-\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
-\tl_new:N \g__fontspec_hexcol_tl
-\tl_new:N \g__fontspec_opacity_tl
-\tl_set:Nn \g__fontspec_hexcol_tl {000000}
-\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\cs_new:Nn \__fontspec_update_featstr:n
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ {
+ \tl_gset:Nx \g__fontspec_single_feat_tl { #1 }
+ \tl_gput_right:Nx \l__fontspec_rawfeatures_sclist {#1;}
+ }
+ }
+\cs_new:Nn \__fontspec_remove_clashing_featstr:n
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \tl_gremove_all:Nn \l__fontspec_rawfeatures_sclist {##1;}
+ }
+ }
\cs_set:Npn \__fontspec_init:
{
\bool_set_false:N \l__fontspec_ot_bool
\bool_set_true:N \l__fontspec_firsttime_bool
- \cs_set:Npn \__fontspec_namewrap:n ##1 { ##1 }
+ \__fontspec_font_is_name:
+ \tl_clear:N \l__fontspec_font_path_tl
\tl_clear:N \l__fontspec_optical_size_tl
+ \tl_clear:N \l__fontspec_ttc_index_tl
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
\tl_clear:N \g__fontspec_curr_series_tl
\tl_gset_eq:NN \l__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
- % This is for detecting font families when assigning default features.
- % Replace defaults for the standard families because they're not set in the usual way:
- \exp_args:NV \str_case:nnF {\l__fontspec_family_label_tl}
- {
- {\rmdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_rmfamily_family} }
- {\sfdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_sffamily_family} }
- {\ttdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_ttfamily_family} }
- }{}
-
\tl_set:Nn \l_fontspec_mode_tl {node}
\int_set:Nn \luatex_prehyphenchar:D { `\- } % fixme
\int_zero:N \luatex_posthyphenchar:D % fixme
\int_zero:N \luatex_preexhyphenchar:D % fixme
\int_zero:N \luatex_postexhyphenchar:D % fixme
}
-\cs_set:Nn \fontspec_make_ot_smallcaps:TF
- {
- \fontspec_check_ot_feat:nTF {+smcp} {#1} {#2}
- }
-\cs_set_eq:NN \__fontspec_make_smallcaps:TF \fontspec_make_ot_smallcaps:TF
-\cs_set_eq:NN \sclist_clear:N \tl_clear:N
-\cs_new:Nn \sclist_gput_right:Nn
- { \tl_gput_right:Nn #1 {#2;} }
-\cs_generate_variant:Nn \sclist_gput_right:Nn {Nx}
-\cs_new:Nn \__fontspec_update_featstr:n
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- {
- \sclist_gput_right:Nx \l__fontspec_rawfeatures_sclist {#1}
- }
- }
-\cs_new:Nn \fontspec_make_feature:nnn
- { \fontspec_make_OT_feature:n {#3} }
-\cs_generate_variant:Nn \fontspec_make_feature:nnn {nnx}
-\cs_new:Nn \fontspec_make_AAT_feature:nn
- {
- \tl_if_empty:nTF {#1}
- { \__fontspec_warning:n {aat-feature-not-exist} }
- {
- \fontspec_make_AAT_feature_string:nnTF {#1}{#2}
- {
- \__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
- }
- { \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
- }
- }
-\cs_new:Nn \fontspec_make_OT_feature:n
- {
- \tl_if_empty:nTF {#1}
- { \__fontspec_warning:n {icu-feature-not-exist} }
- {
- \fontspec_check_ot_feat:nTF {#1}
- {
- \__fontspec_update_featstr:n {#1}
- }
- { \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
- }
- }
-\cs_new_protected:Nn \fontspec_make_numbered_feature:nn
- {
- \fontspec_check_ot_feat:nTF {#1}
- {
- \__fontspec_update_featstr:n { #1 = #2 }
- }
- { \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
- }
-\cs_generate_variant:Nn \fontspec_make_numbered_feature:nn {xn}
-\cs_new:Nn \__fontspec_define_font_feature:n
- {
- \keys_define:nn {fontspec} { #1 .multichoice: }
- }
-\cs_new:Nn \__fontspec_define_feature_option:nnnnn
- {
- \keys_define:nn {fontspec}
- {
- #1/#2 .code:n = { \fontspec_make_feature:nnn{#3}{#4}{#5} }
- }
- }
-\cs_new:Nn \fontspec_define_numbered_feat:nnnn
- {
- \keys_define:nn {fontspec}
- {
- #1/#2 .code:n =
- { \fontspec_make_numbered_feature:nn {#3}{#4} }
- }
- }
-\prg_new_conditional:Nnn \fontspec_make_AAT_feature_string:nn {TF,T,F}
- {
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
- \tl_if_empty:NTF \l_tmpa_tl
- { \prg_return_false: }
- {
- \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
- {
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
- }
- {
- \int_if_even:nTF {#2}
- {
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
- }
- {
- \tl_set:Nx \l_tmpb_tl
- {
- \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
- }
- \tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
- }
- }
- \tl_if_empty:NTF \l_tmpb_tl
- { \prg_return_false: }
- {
- \tl_set:Nx \l_fontspec_feature_string_tl { \l_tmpa_tl = \l_tmpb_tl }
- \prg_return_true:
- }
- }
- }
-\cs_set:Nn \fontspec_iv_str_to_num:Nn
+\cs_new:Nn \__fontspec_init_fontface:
+ {
+ \tl_clear:N \l__fontspec_rawfeatures_sclist
+ \tl_clear:N \l__fontspec_scale_tl
+ \tl_set_eq:NN \l__fontspec_opacity_tl \g__fontspec_opacity_tl
+ \tl_set_eq:NN \l__fontspec_hexcol_tl \g__fontspec_hexcol_tl
+ \tl_set_eq:NN \l__fontspec_postadjust_tl \g__fontspec_postadjust_tl
+ \tl_clear:N \l__fontspec_wordspace_adjust_tl
+ \tl_clear:N \l__fontspec_punctspace_adjust_tl
+ }
+\cs_set:Nn \__fontspec_iv_str_to_num:Nn
{
- \fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil
+ \__fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil
}
-\cs_set:Npn \fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
+\cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
{
\int_set:Nn #1
{
@@ -1386,23 +1476,83 @@
+ \ifx \c_empty_tl #5 32 \else `#5 \fi
}
}
-\cs_generate_variant:Nn \fontspec_iv_str_to_num:Nn {No}
-\cs_set:Nn \fontspec_v_str_to_num:Nn
+\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+\cs_new:Nn \__fontspec_define_opentype_feature_group:n
+ {
+ \keys_define:nn {fontspec-opentype} { #1 .multichoice: }
+ }
+\cs_new:Nn \__fontspec_feat_prop_add:nn
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \prop_if_in:NnF \g__fontspec_OT_features_prop {#1}
+ {
+ \prop_gput:Nnn \g__fontspec_OT_features_prop {#1} {#2}
+ }
+ }
+ }
+\cs_new:Nn \__fontspec_define_opentype_feature:nnnnn
{
- \bool_if:nTF
+ \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \keys_define:nn {fontspec-opentype}
{
- \tl_if_head_eq_charcode_p:nN {#2} {+} ||
- \tl_if_head_eq_charcode_p:nN {#2} {-}
+ #1/#2 .code:n = { \__fontspec_make_OT_feature:nnn {#3} {#4} {#5} }
}
- { \fontspec_iv_str_to_num:No #1 { \use_none:n #2 } }
- { \fontspec_iv_str_to_num:Nn #1 {#2} }
}
-\prg_new_conditional:Nnn \fontspec_check_script:n {TF}
+\cs_new:Nn \__fontspec_feat_off:n {#1Off}
+\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
+\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
+ }
+\cs_new:Nn \__fontspec_define_opentype_onreset:nnnnn
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
+ }
+\cs_new:Nn \__fontspec_make_OT_feature:nnn
+ {
+
+ \bool_set_true:N \l__fontspec_proceed_bool
+ \bool_set_true:N \l__fontspec_check_feat_bool
+
+ \tl_if_empty:nT {#1} { \bool_set_false:N \l__fontspec_check_feat_bool }
+ \bool_if:NT \l__fontspec_check_feat_bool
+ {
+ \__fontspec_check_ot_feat:nF {#1}
+ {
+ \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1}
+ \bool_set_false:N \l__fontspec_proceed_bool
+ }
+ }
+
+ \bool_if:NT \l__fontspec_proceed_bool
+ {
+ \exp_args:Nx \__fontspec_remove_clashing_featstr:n
+ { #2 , \__fontspec_swap_plus_minus:n {#2} , #3 }
+
+ \__fontspec_update_featstr:n {#2}
+ }
+ }
+\cs_generate_variant:Nn \__fontspec_make_OT_feature:nnn {xxx}
+\cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:NNNNN #1 }
+\cs_new:Nn \__fontspec_swap_plus_minus_aux:NNNNN
+ { \str_case:nn {#1} { {+} {-#2#3#4#5} {-} {+#2#3#4#5} } }
+\prg_new_conditional:Nnn \__fontspec_check_script:n {TF}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
\directlua{fontspec.check_ot_script("l_fontspec_font", "#1")}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-\prg_new_conditional:Nnn \fontspec_check_lang:n {TF}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_lang:n {TF}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
\directlua
{
@@ -1410,7 +1560,11 @@
}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-\prg_new_conditional:Nnn \fontspec_check_ot_feat:n {TF,T}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:n {TF,F}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
\directlua
{
@@ -1421,34 +1575,166 @@
}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-
+ }
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvm}{Above-base~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvs}{Above-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {afrc}{Alternative~Fractions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {akhn}{Akhands}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blwf}{Below-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blwm}{Below-base~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blws}{Below-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {calt}{Contextual~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {case}{Case-Sensitive~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ccmp}{Glyph~Composition~/~Decomposition}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cfar}{Conjunct~Form~After~Ro}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cjct}{Conjunct~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {clig}{Contextual~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cpct}{Centered~CJK~Punctuation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cpsp}{Capital~Spacing}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cswh}{Contextual~Swash}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {curs}{Cursive~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cvNN}{Character~Variant~$N$}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {c2pc}{Petite~Capitals~From~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {c2sc}{Small~Capitals~From~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dist}{Distances}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dlig}{Discretionary~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dnom}{Denominators}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dtls}{Dotless~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {expt}{Expert~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {falt}{Final~Glyph~on~Line~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fin2}{Terminal~Forms~\#2}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fin3}{Terminal~Forms~\#3}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fina}{Terminal~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {flac}{Flattened~accent~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {frac}{Fractions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fwid}{Full~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {half}{Half~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {haln}{Halant~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {halt}{Alternate~Half~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hist}{Historical~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hkna}{Horizontal~Kana~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hlig}{Historical~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hngl}{Hangul}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hojo}{Hojo~Kanji~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hwid}{Half~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {init}{Initial~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {isol}{Isolated~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ital}{Italics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jalt}{Justification~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp78}{JIS78~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp83}{JIS83~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp90}{JIS90~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp04}{JIS2004~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {kern}{Kerning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {lfbd}{Left~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {liga}{Standard~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ljmo}{Leading~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {lnum}{Lining~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {locl}{Localized~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ltra}{Left-to-right~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ltrm}{Left-to-right~mirrored~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mark}{Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {med2}{Medial~Forms~\#2}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {medi}{Medial~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mgrk}{Mathematical~Greek}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mkmk}{Mark~to~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mset}{Mark~Positioning~via~Substitution}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nalt}{Alternate~Annotation~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nlck}{NLC~Kanji~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nukt}{Nukta~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {numr}{Numerators}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {onum}{Oldstyle~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {opbd}{Optical~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ordn}{Ordinals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ornm}{Ornaments}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {palt}{Proportional~Alternate~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pcap}{Petite~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pkna}{Proportional~Kana}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pnum}{Proportional~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pref}{Pre-Base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pres}{Pre-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pstf}{Post-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {psts}{Post-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pwid}{Proportional~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {qwid}{Quarter~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rand}{Randomize}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rclt}{Required~Contextual~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rkrf}{Rakar~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rlig}{Required~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rphf}{Reph~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtbd}{Right~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtla}{Right-to-left~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtlm}{Right-to-left~mirrored~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ruby}{Ruby~Notation~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rvrn}{Required~Variation~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {salt}{Stylistic~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {sinf}{Scientific~Inferiors}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {size}{Optical~size}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {smcp}{Small~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {smpl}{Simplified~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ssNN}{Stylistic~Set~$N$}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ssty}{Math~script~style~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {stch}{Stretching~Glyph~Decomposition}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {subs}{Subscript}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {sups}{Superscript}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {swsh}{Swash}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {titl}{Titling}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tjmo}{Trailing~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tnam}{Traditional~Name~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tnum}{Tabular~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {trad}{Traditional~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {twid}{Third~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {unic}{Unicase}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {valt}{Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vatu}{Vattu~Variants}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vert}{Vertical~Writing}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vhal}{Alternate~Vertical~Half~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vjmo}{Vowel~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vkna}{Vertical~Kana~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vkrn}{Vertical~Kerning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vpal}{Proportional~Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrt2}{Vertical~Alternates~and~Rotation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+
+
+\clist_set:Nn \g__fontspec_all_keyval_modules_clist
+ {
+ fontspec, fontspec-opentype, fontspec-aat,
+ fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested,
+ fontspec-renderer
+ }
\cs_new:Nn \__fontspec_keys_define_code:nnn
- {
- \keys_define:nn {#1} { #2 .code:n = {#3} }
- }
+ {
+ \keys_define:nn {#1} { #2 .code:n = {#3} }
+ }
\cs_new:Nn \__fontspec_aff_error:n
{
\__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1}
{ \__fontspec_error:nx {not-in-addfontfeatures} {#1} }
}
-\bool_new:N \l__fontspec_external_bool
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ExternalLocation}
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path}
{
\bool_set_true:N \l__fontspec_nobf_bool
\bool_set_true:N \l__fontspec_noit_bool
\bool_set_true:N \l__fontspec_external_bool
- \cs_set:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
+ \tl_set:Nn \l__fontspec_font_path_tl {#1}
+ \__fontspec_font_is_file:
}
-\aliasfontfeature{ExternalLocation}{Path}
+\aliasfontfeature{Path}{ExternalLocation}
+\__fontspec_keys_define_code:nnn {fontspec} {Path} {}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
{
\tl_set:Nn \l__fontspec_extension_tl {#1}
\bool_if:NF \l__fontspec_external_bool
{
- \keys_set:nn {fontspec-preparse-external} {ExternalLocation}
+ \keys_set:nn {fontspec-preparse-external} {Path}
}
}
\tl_clear:N \l__fontspec_extension_tl
+\__fontspec_keys_define_code:nnn {fontspec} {Extension} {}
\keys_define:nn {fontspec-renderer}
{
Renderer .choices:nn =
@@ -1460,6 +1746,7 @@
{
\tl_set:Nv \l_fontspec_mode_tl
{ g_fontspec_mode_tag_ \l_keys_choice_tl }
+ \tl_gset:Nx \g__fontspec_single_feat_tl { mode=\l_fontspec_mode_tl }
}
}
}
@@ -1477,7 +1764,16 @@
{
\tl_set:Nn \l__fontspec_lang_name_tl {#1}
}
-\seq_new:N \g__fontspec_bf_series_seq
+\__fontspec_keys_define_code:nnn {fontspec-preparse} {FontIndex}
+ {
+ \str_if_eq_x:nnF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ { \__fontspec_warning:n {font-index-needs-ttc} }
+ \tl_set:Nn \l__fontspec_ttc_index_tl {(#1)}
+ }
+\__fontspec_keys_define_code:nnn {fontspec} {FontIndex}
+ {
+ \tl_set:Nn \l__fontspec_ttc_index_tl {(#1)}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
{
\tl_gset:Nx \g__fontspec_curr_series_tl { #1 }
@@ -1485,14 +1781,12 @@
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_up_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {FontName}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_up_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
{
\tl_if_empty:nTF {#1}
@@ -1509,7 +1803,7 @@
\seq_put_right:Nx \g__fontspec_bf_series_seq {\bfdefault}
}
\tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
- { \tl_set_eq:NN \l_fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
+ { \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
\prop_put:NxV \l__fontspec_nfss_prop
@@ -1517,7 +1811,6 @@
}
}
-\prop_new:N \l__fontspec_nfss_prop
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
{
\tl_if_empty:nTF {#1}
@@ -1526,20 +1819,20 @@
}
{
\bool_set_false:N \l__fontspec_noit_bool
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_it_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_bfit_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_sl_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_bfsl_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFont}
{
@@ -1549,16 +1842,9 @@
}
{
\bool_set_false:N \l__fontspec_nosc_bool
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_sc_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
}
}
-\cs_set:Nn \fontspec_complete_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
- \tl_remove_all:Nn #1 {~}
- }
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
{
\clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
@@ -1633,7 +1919,6 @@
\tl_if_exist:NT \l_fontspec_family_tl
{ \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
}
-\prop_new:N \l__fontspec_nfssfont_prop
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
\tl_set:No \l__fontspec_arg_tl { \use_iii:nnn #1 }
@@ -1651,20 +1936,6 @@
\__fontspec_add_nfssfont:nnnn
{\use_i:nnn #1}{\use_ii:nnn #1}{\l__fontspec_this_font_tl}{\l__fontspec_this_feat_tl}
}
-\cs_new:Nn \__fontspec_add_nfssfont:nnnn
- {
- \tl_set:Nx \l__fontspec_this_font_tl {#3}
-
- \tl_if_empty:xTF {#4}
- { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
- { \keys_set_known:noN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
-
- \tl_if_empty:NF \l__fontspec_this_font_tl
- {
- \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
- { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
- }
- }
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
@@ -1697,7 +1968,7 @@
\settoheight #1
{
\str_if_eq:nnTF {#3} {\font} \rmfamily #3
- \int_case:nnn #2
+ \int_case:nnF #2
{
{5} {x} % x-height
{8} {X} % cap-height
@@ -1774,7 +2045,7 @@
\tl_if_single:nTF {#1}
{ \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
{ \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} }
- \font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
{
@@ -1816,7 +2087,6 @@
\tl_set:Nn \l__fontspec_opacity_tl {#7#8}
}
\aliasfontfeature{Color}{Colour}
-\int_new:N \l__fontspec_tmp_int
\__fontspec_keys_define_code:nnn {fontspec} {Opacity}
{
\int_set:Nn \l__fontspec_tmp_int {255}
@@ -1838,14 +2108,10 @@
{
\__fontspec_warning:n {no-mapping-ligtex}
\msg_redirect_name:nnn {fontspec} {no-mapping-ligtex} {none}
- \keys_set:nn {fontspec} { Ligatures=TeX }
+ \keys_set:nn {fontspec-opentype} { Ligatures=TeX }
}
{ \__fontspec_warning:n {no-mapping} }
}
-\__fontspec_keys_define_code:nnn {fontspec} {FeatureFile}
- {
- \__fontspec_update_featstr:n { featurefile = #1 }
- }
\__fontspec_keys_define_code:nnn {fontspec} {Weight}
{
\__fontspec_update_featstr:n{weight=#1}
@@ -1884,17 +2150,17 @@
{
\bool_if:NT \l__fontspec_firsttime_bool
{
- \tl_set:Nn \l_fontspec_fake_slant_tl {#1}
+ \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
\clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
\bool_set_false:N \l__fontspec_noit_bool
- \tl_if_empty:NF \l_fontspec_fake_embolden_tl
+ \tl_if_empty:NF \l__fontspec_fake_embolden_tl
{
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeBold=\l_fontspec_fake_embolden_tl}
+ {FakeBold=\l__fontspec_fake_embolden_tl}
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
},
@@ -1906,154 +2172,250 @@
{
\bool_if:NT \l__fontspec_firsttime_bool
{
- \tl_set:Nn \l_fontspec_fake_embolden_tl {#1}
+ \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
\clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
\bool_set_false:N \l__fontspec_nobf_bool
- \tl_if_empty:NF \l_fontspec_fake_slant_tl
+ \tl_if_empty:NF \l__fontspec_fake_slant_tl
{
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeSlant=\l_fontspec_fake_slant_tl}
+ {FakeSlant=\l__fontspec_fake_slant_tl}
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
},
AutoFakeBold .default:n = {1.5}
}
-\__fontspec_define_font_feature:n{Ligatures}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Required} {1}{0}{+rlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRequired} {1}{1}{-rlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Common} {1}{2}{+liga}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoCommon} {1}{3}{-liga}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Rare} {1}{4}{+dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRare} {1}{5}{-dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Discretionary} {1}{4}{+dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoDiscretionary}{1}{5}{-dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Contextual} {}{} {+clig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoContextual} {}{} {-clig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Historic} {}{} {+hlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoHistoric} {}{} {-hlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Logos} {1}{6} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoLogos} {1}{7} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Rebus} {1}{8} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRebus} {1}{9} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Diphthong} {1}{10}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoDiphthong} {1}{11}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Squared} {1}{12}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoSquared} {1}{13}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{AbbrevSquared} {1}{14}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoAbbrevSquared}{1}{15}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Icelandic} {1}{32}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoIcelandic} {1}{33}{}
-\keys_define:nn {fontspec}
+\__fontspec_keys_define_code:nnn {fontspec} {RawFeature}
{
- Ligatures / TeX .code:n =
- {
- \__fontspec_update_featstr:n { +tlig }
- }
- }
-\__fontspec_define_font_feature:n{Letters}
-\__fontspec_define_feature_option:nnnnn{Letters}{Normal} {3}{0}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{Uppercase} {3}{1}{+case}
-\__fontspec_define_feature_option:nnnnn{Letters}{Lowercase} {3}{2}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{SmallCaps} {3}{3}{+smcp}
-\__fontspec_define_feature_option:nnnnn{Letters}{PetiteCaps} {} {} {+pcap}
-\__fontspec_define_feature_option:nnnnn{Letters}{UppercaseSmallCaps} {} {} {+c2sc}
-\__fontspec_define_feature_option:nnnnn{Letters}{UppercasePetiteCaps}{} {} {+c2pc}
-\__fontspec_define_feature_option:nnnnn{Letters}{InitialCaps} {3}{4}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{Unicase} {} {} {+unic}
-\__fontspec_define_feature_option:nnnnn{Letters}{Random} {} {} {+rand}
-\__fontspec_define_font_feature:n{Numbers}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Monospaced} {6} {0}{+tnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Proportional} {6} {1}{+pnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Lowercase} {21}{0}{+onum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{OldStyle} {21}{0}{+onum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Uppercase} {21}{1}{+lnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Lining} {21}{1}{+lnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{SlashedZero} {14}{5}{+zero}
-\__fontspec_define_feature_option:nnnnn{Numbers}{NoSlashedZero}{14}{4}{-zero}
-\luatex_if_engine:T
- {
- \__fontspec_define_feature_option:nnnnn{Numbers}{Arabic}{}{}{+anum}
- }
-\__fontspec_define_font_feature:n {Contextuals}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Swash} {} {} {+cswh}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoSwash} {} {} {-cswh}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Alternate} {} {} {+calt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoAlternate} {} {} {-calt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{WordInitial} {8}{0}{+init}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoWordInitial}{8}{1}{-init}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{WordFinal} {8}{2}{+fina}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoWordFinal} {8}{3}{-fina}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{LineInitial} {8}{4}{}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoLineInitial}{8}{5}{}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{LineFinal} {8}{6}{+falt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoLineFinal} {8}{7}{-falt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Inner} {8}{8}{+medi}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoInner} {8}{9}{-medi}
-\__fontspec_define_font_feature:n{Diacritics}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Show} {9}{0}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Hide} {9}{1}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Decompose} {9}{2}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{MarkToBase} {}{}{+mark}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoMarkToBase}{}{}{-mark}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{MarkToMark} {}{}{+mkmk}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoMarkToMark}{}{}{-mkmk}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{AboveBase} {}{}{+abvm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoAboveBase} {}{}{-abvm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{BelowBase} {}{}{+blwm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoBelowBase} {}{}{-blwm}
-\__fontspec_define_font_feature:n{Kerning}
-\__fontspec_define_feature_option:nnnnn{Kerning}{Uppercase}{}{}{+cpsp}
-\__fontspec_define_feature_option:nnnnn{Kerning}{On} {}{}{+kern}
-\__fontspec_define_feature_option:nnnnn{Kerning}{Off} {}{}{-kern}
-\__fontspec_define_font_feature:n{VerticalPosition}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Normal} {10}{0}{}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Superior} {10}{1}{+sups}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Inferior} {10}{2}{+subs}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Ordinal} {10}{3}{+ordn}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Numerator} {} {} {+numr}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Denominator}{} {} {+dnom}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{ScientificInferior}{}{}{+sinf}
-\__fontspec_define_font_feature:n{Fractions}
-\__fontspec_define_feature_option:nnnnn{Fractions}{On} {11}{1}{+frac}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Off} {11}{0}{-frac}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Diagonal} {11}{2}{}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Alternate}{} {} {+afrc}
-\__fontspec_define_font_feature:n { Alternate }
-\keys_define:nn {fontspec}
+ \__fontspec_update_featstr:n {#1}
+ }
+
+\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {cvNN} { CharacterVariant\,=\,$N$:$M$ }
+\__fontspec_feat_prop_add:nn {ssNN} { StylisticSet\,=\,$N$ }
+\__fontspec_define_opentype_feature_group:n {Ligatures}
+\__fontspec_define_opentype_feature:nnnnn {Ligatures} {ResetAll} {} {}
+ {
+ +dlig,-dlig,+rlig,-rlig,+liga,-liga,+dlig,-dlig,+clig,-clig,+hlig,-hlig,
+ +tlig,-tlig
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Required} {rlig} {rlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Common} {liga} {liga} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Rare} {dlig} {dlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Discretionary} {dlig} {dlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Contextual} {clig} {clig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Historic} {hlig} {hlig} {}
+\__fontspec_define_opentype_onreset:nnnnn {Ligatures} {TeX} {} { +tlig } {}
+\__fontspec_define_opentype_feature_group:n {Letters}
+\__fontspec_define_opentype_feature:nnnnn {Letters} {ResetAll} {} {}
+ {
+ +case,+smcp,+pcap,+c2sc,+c2pc,+unic,+rand,
+ -case,-smcp,-pcap,-c2sc,-c2pc,-unic,-rand
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Uppercase} {case} {case} {+smcp,+pcap,+c2sc,+c2pc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {SmallCaps} {smcp} {smcp} {+pcap,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {PetiteCaps} {pcap} {pcap} {+smcp,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {UppercaseSmallCaps} {c2sc} {c2sc} {+c2pc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {UppercasePetiteCaps} {c2pc} {c2pc} {+c2sc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Unicase} {unic} {unic} {+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Random} {rand} {rand} {+unic}
+\__fontspec_define_opentype_feature_group:n {Numbers}
+\__fontspec_define_opentype_feature:nnnnn {Numbers} {ResetAll} {} {}
+ {
+ +tnum,-tnum,
+ +pnum,-pnum,
+ +onum,-onum,
+ +lnum,-lnum,
+ +zero,-zero,
+ +anum,-anum,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Monospaced} {tnum} {tnum} {+pnum,-pnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Proportional} {pnum} {pnum} {+tnum,-tnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Lowercase} {onum} {onum} {+lnum,-lnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Uppercase} {lnum} {lnum} {+onum,-onum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {SlashedZero} {zero} {zero} {}
+\aliasfontfeatureoption {Numbers} {Lowercase} {OldStyle}
+\aliasfontfeatureoption {Numbers} {Uppercase} {Lining}
+ \__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Arabic} {anum} {anum} {}
+\__fontspec_define_opentype_feature_group:n {VerticalPosition}
+\__fontspec_define_opentype_feature:nnnnn {VerticalPosition} {ResetAll} {} {}
+ {
+ +sups,-sups,
+ +subs,-subs,
+ +ordn,-ordn,
+ +numr,-numr,
+ +dnom,-dnom,
+ +sinf,-sinf,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Superior} {sups} {sups} {+subs,+ordn,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Inferior} {subs} {subs} {+sups,+ordn,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Ordinal} {ordn} {ordn} {+sups,+subs,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Numerator} {numr} {numr} {+sups,+subs,+ordn,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Denominator} {dnom} {dnom} {+sups,+subs,+ordn,+numr,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {ScientificInferior} {sinf} {sinf} {+sups,+subs,+ordn,+numr,+dnom}
+\__fontspec_define_opentype_feature_group:n {Contextuals}
+\__fontspec_define_opentype_feature:nnnnn {Contextuals} {ResetAll} {} {}
+ {
+ +cswh,-cswh,
+ +calt,-calt,
+ +init,-init,
+ +fina,-fina,
+ +falt,-falt,
+ +medi,-medi,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Swash} {cswh} {cswh} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Alternate} {calt} {calt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {WordInitial} {init} {init} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {WordFinal} {fina} {fina} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {LineFinal} {falt} {falt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Inner} {medi} {medi} {}
+\__fontspec_define_opentype_feature_group:n {Diacritics}
+\__fontspec_define_opentype_feature:nnnnn {Diacritics} {ResetAll} {} {}
+ {
+ +mark,-mark,
+ +mkmk,-mkmk,
+ +abvm,-abvm,
+ +blwm,-blwm,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToBase} {mark} {mark} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToMark} {mkmk} {mkmk} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {AboveBase} {abvm} {abvm} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {BelowBase} {blwm} {blwm} {}
+\__fontspec_define_opentype_feature_group:n {Kerning}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {ResetAll} {} {}
+ {
+ +cpsp,-cpsp,
+ +kern,-kern,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Kerning} {Uppercase} {cpsp} {cpsp} {}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {On} {kern} {+kern} {-kern}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {Off} {kern} {-kern} {+kern}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {Reset} {} {} {+kern,-kern}
+\__fontspec_define_opentype_feature_group:n {Fractions}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {ResetAll} {} {}
+ {
+ +frac,-frac,
+ +afrc,-afrc,
+ }
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {On} {frac} {+frac} {}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
+\__fontspec_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
+
+\__fontspec_define_opentype_feature_group:n {Style}
+\__fontspec_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
+ {
+ +salt,-salt,
+ +ital,-ital,
+ +ruby,-ruby,
+ +swsh,-swsh,
+ +hist,-hist,
+ +titl,-titl,
+ +hkna,-hkna,
+ +vkna,-vkna,
+ +ssty=0,-ssty=0,
+ +ssty=1,-ssty=1,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Alternate} {salt} {salt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Italic} {ital} {ital} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Ruby} {ruby} {ruby} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Swash} {swsh} {swsh} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Cursive} {swsh} {curs} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Historic} {hist} {hist} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {TitlingCaps} {titl} {titl} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {HorizontalKana} {hkna} {hkna} {+vkna,+pkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {VerticalKana} {vkna} {vkna} {+hkna,+pkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {ProportionalKana} {pkna} {pkna} {+vkna,+hkna}
+\__fontspec_define_opentype_feature:nnnnn {Style} {MathScript} {ssty} {+ssty=0} {+ssty=1}
+\__fontspec_define_opentype_feature:nnnnn {Style} {MathScriptScript} {ssty} {+ssty=1} {+ssty=0}
+\__fontspec_define_opentype_feature_group:n {CJKShape}
+\__fontspec_define_opentype_feature:nnnnn {CJKShape} {ResetAll} {} {}
+ {
+ +trad,-trad,
+ +smpl,-smpl,
+ +jp78,-jp78,
+ +jp83,-jp83,
+ +jp90,-jp90,
+ +jp04,-jp04,
+ +expt,-expt,
+ +nlck,-nlck,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Traditional} {trad} {trad} {+smpl,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Simplified} {smpl} {smpl} {+trad,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1978} {jp78} {jp78} {+trad,+smpl,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1983} {jp83} {jp83} {+trad,+smpl,+jp78,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1990} {jp90} {jp90} {+trad,+smpl,+jp78,+jp83,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS2004} {jp04} {jp04} {+trad,+smpl,+jp78,+jp83,+jp90,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Expert} {expt} {expt} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {NLC} {nlck} {nlck} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+expt}
+\__fontspec_define_opentype_feature_group:n {CharacterWidth}
+\__fontspec_define_opentype_feature:nnnnn {CharacterWidth} {ResetAll} {} {}
+ {
+ +pwid,-pwid,
+ +fwid,-fwid,
+ +hwid,-hwid,
+ +twid,-twid,
+ +qwid,-qwid,
+ +palt,-palt,
+ +halt,-halt,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Proportional} {pwid} {pwid} {+fwid,+hwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Full} {fwid} {fwid} {+pwid,+hwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Half} {hwid} {hwid} {+pwid,+fwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Third} {twid} {twid} {+pwid,+fwid,+hwid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Quarter} {qwid} {qwid} {+pwid,+fwid,+hwid,+twid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateProportional} {palt} {palt} {+pwid,+fwid,+hwid,+twid,+qwid,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateHalf} {halt} {halt} {+pwid,+fwid,+hwid,+twid,+qwid,+palt}
+\__fontspec_define_opentype_feature_group:n {Vertical}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {RotatedGlyphs} {vrt2} {vrt2} {+vrtr,+vert}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {AlternatesForRotation} {vrtr} {vrtr} {+vrt2}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {Alternates} {vert} {vert} {+vrt2}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {KanaAlternates} {vkna} {vkna} {+hkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {Kerning} {vkrn} {vkrn} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {AlternateMetrics} {valt} {valt} {+vhal,+vpal,+kern}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {HalfMetrics} {vhal} {vhal} {+valt,+vpal,+kern}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
+\__fontspec_define_opentype_feature_group:n {Alternate}
+\keys_define:nn {fontspec-opentype}
{
Alternate .default:n = {0} ,
+ Alternate / Random .code:n =
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = random }{} } ,
Alternate / unknown .code:n =
{
\clist_map_inline:nn {#1}
- { \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
}
}
-\cs_set:Nn \fontspec_salt:n { +salt = #1 }
-\__fontspec_define_font_feature:n {Variant}
-\keys_define:nn {fontspec}
+\aliasfontfeature{Alternate}{StylisticAlternates}
+\__fontspec_define_opentype_feature_group:n {Variant}
+\keys_define:nn {fontspec-opentype}
{
Variant .default:n = {0} ,
Variant / unknown .code:n =
{
\clist_map_inline:nn {#1}
- { \fontspec_make_feature:nnx {18}{##1} { +ss \two@digits {##1} } }
+ {
+ \__fontspec_make_OT_feature:xxx { ss \two@digits {##1} } { +ss \two@digits {##1} } {}
+ }
}
}
\aliasfontfeature{Variant}{StylisticSet}
-\__fontspec_define_font_feature:n { CharacterVariant }
+\__fontspec_define_opentype_feature_group:n {CharacterVariant}
\use:x
{
\cs_new:Npn \exp_not:N \fontspec_parse_cv:w
##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
{
- \fontspec_make_numbered_feature:xn
- { +cv \exp_not:N \two@digits {##1} } {##2}
+ \__fontspec_make_OT_feature:xxx
+ { cv \exp_not:N \two@digits {##1} } { +cv \exp_not:N \two@digits {##1} = ##2 } {}
}
- \keys_define:nn {fontspec}
+ \keys_define:nn {fontspec-opentype}
{
CharacterVariant / unknown .code:n =
{
@@ -2065,90 +2427,53 @@
}
}
}
-\__fontspec_define_font_feature:n{Style}
-\__fontspec_define_feature_option:nnnnn{Style}{Alternate} {} {} {+salt}
-\__fontspec_define_feature_option:nnnnn{Style}{Italic} {32}{2}{+ital}
-\__fontspec_define_feature_option:nnnnn{Style}{Ruby} {28}{2}{+ruby}
-\__fontspec_define_feature_option:nnnnn{Style}{Swash} {} {} {+swsh}
-\__fontspec_define_feature_option:nnnnn{Style}{Historic} {} {} {+hist}
-\__fontspec_define_feature_option:nnnnn{Style}{Display} {19}{1}{}
-\__fontspec_define_feature_option:nnnnn{Style}{Engraved} {19}{2}{}
-\__fontspec_define_feature_option:nnnnn{Style}{TitlingCaps} {19}{4}{+titl}
-\__fontspec_define_feature_option:nnnnn{Style}{TallCaps} {19}{5}{}
-\__fontspec_define_feature_option:nnnnn{Style}{HorizontalKana}{} {} {+hkna}
-\__fontspec_define_feature_option:nnnnn{Style}{VerticalKana} {} {} {+vkna}
-\fontspec_define_numbered_feat:nnnn {Style} {MathScript} {+ssty} {0}
-\fontspec_define_numbered_feat:nnnn {Style} {MathScriptScript} {+ssty} {1}
-\__fontspec_define_font_feature:n{CJKShape}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Traditional}{20}{0} {+trad}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Simplified} {20}{1} {+smpl}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1978} {20}{2} {+jp78}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1983} {20}{3} {+jp83}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1990} {20}{4} {+jp90}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Expert} {20}{10}{+expt}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{NLC} {20}{13}{+nlck}
-\__fontspec_define_font_feature:n{CharacterWidth}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Proportional}{22}{0}{+pwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Full}{22}{1}{+fwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Half}{22}{2}{+hwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Third}{22}{3}{+twid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Quarter}{22}{4}{+qwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{AlternateProportional}{22}{5}{+palt}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{AlternateHalf}{22}{6}{+halt}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Default}{22}{7}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Off}{24}{0}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Box}{24}{1}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{RoundedBox}{24}{2}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Circle}{24}{3}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackCircle}{24}{4}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Parenthesis}{24}{5}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Period}{24}{6}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{RomanNumerals}{24}{7}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Diamond}{24}{8}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackSquare}{24}{9}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackRoundSquare}{24}{10}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{DoubleCircle}{24}{11}{}
-\__fontspec_define_font_feature:n { Annotation }
-\keys_define:nn {fontspec}
+\__fontspec_define_opentype_feature_group:n {Annotation}
+\keys_define:nn {fontspec-opentype}
{
Annotation .default:n = {0} ,
Annotation / unknown .code:n =
{
- \fontspec_make_feature:nnx {}{}{ +nalt=#1 }
+ \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
}
}
-\keys_define:nn {fontspec}
+\__fontspec_define_opentype_feature_group:n {Ornament}
+\keys_define:nn {fontspec-opentype}
{
- Vertical .choice: ,
- Vertical / RotatedGlyphs .code:n =
+ Ornament .default:n = {0} ,
+ Ornament / unknown .code:n =
{
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \fontspec_make_feature:nnn{}{}{+vrt2}
- \__fontspec_update_featstr:n {vertical}
- }
- {
- \__fontspec_update_featstr:n {vertical}
- }
+ \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
}
}
-\keys_define:nn { fontspec } { Script .choice: }
+\keys_define:nn { fontspec-opentype } { Script .choice: }
\cs_new:Nn \fontspec_new_script:nn
{
- \keys_define:nn { fontspec } { Script / #1 .code:n =
+ \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \bool_set_false:N \l__fontspec_script_exist_bool
\clist_map_inline:nn {#2}
{
- \fontspec_check_script:nTF {####1}
+ \__fontspec_check_script:nTF {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
- \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ \bool_set_true:N \l__fontspec_script_exist_bool
+ \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
\clist_map_break:
}
+ { }
+ }
+ \bool_if:NF \l__fontspec_script_exist_bool
+ {
+ \str_if_eq:nnTF {#1} {Latin}
{
- \fontspec_check_script:nTF {latn}
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ {
+ \__fontspec_check_script:nTF {latn}
{
\__fontspec_warning:nx {script-not-exist-latn} {#1}
- \keys_set:nn {fontspec} {Script=Latin}
+ \tl_set:Nn \l_fontspec_script_tl {latn}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
}
{
\__fontspec_warning:nx {script-not-exist} {#1}
@@ -2157,296 +2482,607 @@
}
}
}
-\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
+\keys_define:nn { fontspec-opentype } { Language .choice: }
+\cs_new:Nn \fontspec_new_lang:nn
+ {
+ \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \__fontspec_check_lang:nTF {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec-opentype } { Language = Default }
+ }
+ }
+ }
+\__fontspec_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {DFLT}
+ \int_zero:N \l__fontspec_language_int
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
+ }
+\keys_define:nn {fontspec-opentype}
+ {
+ Language / Turkish .code:n =
+ {
+ \__fontspec_check_lang:nTF {TRK}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TRK}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
+ }
+ {
+ \__fontspec_check_lang:nTF {TUR}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TUR}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {Turkish}
+ \keys_set:nn {fontspec-opentype} {Language=Default}
+ }
+ }
+ }
+ }
+\cs_new:Nn \__fontspec_ot_compat:nn
+ {
+ \aliasfontfeatureoption {#1} {#2Off} {No#2}
+ }
+\__fontspec_ot_compat:nn {Ligatures} {Rare}
+\__fontspec_ot_compat:nn {Ligatures} {Required}
+\__fontspec_ot_compat:nn {Ligatures} {Common}
+\__fontspec_ot_compat:nn {Ligatures} {Discretionary}
+\__fontspec_ot_compat:nn {Ligatures} {Contextual}
+\__fontspec_ot_compat:nn {Ligatures} {Historic}
+\__fontspec_ot_compat:nn {Numbers} {SlashedZero}
+\__fontspec_ot_compat:nn {Contextuals} {Swash}
+\__fontspec_ot_compat:nn {Contextuals} {Alternate}
+\__fontspec_ot_compat:nn {Contextuals} {WordInitial}
+\__fontspec_ot_compat:nn {Contextuals} {WordFinal}
+\__fontspec_ot_compat:nn {Contextuals} {LineFinal}
+\__fontspec_ot_compat:nn {Contextuals} {Inner}
+\__fontspec_ot_compat:nn {Diacritics} {MarkToBase}
+\__fontspec_ot_compat:nn {Diacritics} {MarkToMark}
+\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
+\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
+
+\newfontscript{Arabic}{arab}
+\newfontscript{Armenian}{armn}
\newfontscript{Balinese}{bali}
\newfontscript{Bengali}{bng2,beng}
-\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
-\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
+\newfontscript{Bopomofo}{bopo}
+\newfontscript{Braille}{brai}
+\newfontscript{Buginese}{bugi}
+\newfontscript{Buhid}{buhd}
\newfontscript{Byzantine~Music}{byzm}
\newfontscript{Canadian~Syllabics}{cans}
\newfontscript{Cherokee}{cher}
-\newfontscript{CJK~Ideographic}{hani} \newfontscript{Coptic}{copt}
-\newfontscript{Cypriot~Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
-\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
+\newfontscript{CJK~Ideographic}{hani}
+\newfontscript{Coptic}{copt}
+\newfontscript{Cypriot~Syllabary}{cprt}
+\newfontscript{Cyrillic}{cyrl}
+\newfontscript{Default}{DFLT}
+\newfontscript{Deseret}{dsrt}
\newfontscript{Devanagari}{dev2,deva}
\newfontscript{Ethiopic}{ethi}
-\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
-\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
+\newfontscript{Georgian}{geor}
+\newfontscript{Glagolitic}{glag}
+\newfontscript{Gothic}{goth}
+\newfontscript{Greek}{grek}
\newfontscript{Gujarati}{gjr2,gujr}
\newfontscript{Gurmukhi}{gur2,guru}
-\newfontscript{Hangul~Jamo}{jamo} \newfontscript{Hangul}{hang}
-\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
+\newfontscript{Hangul~Jamo}{jamo}
+\newfontscript{Hangul}{hang}
+\newfontscript{Hanunoo}{hano}
+\newfontscript{Hebrew}{hebr}
\newfontscript{Hiragana~and~Katakana}{kana}
\newfontscript{Javanese}{java}
\newfontscript{Kannada}{knd2,knda}
-\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
-\newfontscript{Lao}{lao~} \newfontscript{Latin}{latn}
-\newfontscript{Limbu}{limb} \newfontscript{Linear~B}{linb}
+\newfontscript{Kharosthi}{khar}
+\newfontscript{Khmer}{khmr}
+\newfontscript{Lao}{lao~}
+\newfontscript{Latin}{latn}
+\newfontscript{Limbu}{limb}
+\newfontscript{Linear~B}{linb}
\newfontscript{Malayalam}{mlm2,mlym}
\newfontscript{Math}{math}
\newfontscript{Mongolian}{mong}
-\newfontscript{Musical~Symbols}{musc} \newfontscript{Myanmar}{mymr}
-\newfontscript{N'ko}{nko~} \newfontscript{Ogham}{ogam}
+\newfontscript{Musical~Symbols}{musc}
+\newfontscript{Myanmar}{mymr}
+\newfontscript{N'ko}{nko~}
+\newfontscript{Ogham}{ogam}
\newfontscript{Old~Italic}{ital}
\newfontscript{Old~Persian~Cuneiform}{xpeo}
\newfontscript{Oriya}{ory2,orya}
\newfontscript{Osmanya}{osma}
-\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
-\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
+\newfontscript{Phags-pa}{phag}
+\newfontscript{Phoenician}{phnx}
+\newfontscript{Runic}{runr}
+\newfontscript{Shavian}{shaw}
\newfontscript{Sinhala}{sinh}
\newfontscript{Sumero-Akkadian~Cuneiform}{xsux}
-\newfontscript{Syloti~Nagri}{sylo} \newfontscript{Syriac}{syrc}
-\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
-\newfontscript{Tai~Le}{tale} \newfontscript{Tai~Lu}{talu}
+\newfontscript{Syloti~Nagri}{sylo}
+\newfontscript{Syriac}{syrc}
+\newfontscript{Tagalog}{tglg}
+\newfontscript{Tagbanwa}{tagb}
+\newfontscript{Tai~Le}{tale}
+\newfontscript{Tai~Lu}{talu}
\newfontscript{Tamil}{tml2,taml}
\newfontscript{Telugu}{tel2,telu}
-\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
-\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
-\newfontscript{Ugaritic~Cuneiform}{ugar}\newfontscript{Yi}{yi~~}
+\newfontscript{Thaana}{thaa}
+\newfontscript{Thai}{thai}
+\newfontscript{Tibetan}{tibt}
+\newfontscript{Tifinagh}{tfng}
+\newfontscript{Ugaritic~Cuneiform}{ugar}
+\newfontscript{Yi}{yi~~}
\newfontscript{Kana}{kana}
\newfontscript{Maths}{math}
\newfontscript{CJK}{hani}
-\keys_define:nn { fontspec } { Language .choice: }
-\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec } { Language / #1 .code:n =
- \fontspec_check_lang:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec } { Language = Default }
- }
- }
- }
-\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}
-\newfontlanguage{Adyghe}{ADY}\newfontlanguage{Afrikaans}{AFK}
-\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
-\newfontlanguage{Altai}{ALT}\newfontlanguage{Amharic}{AMH}
-\newfontlanguage{Arabic}{ARA}\newfontlanguage{Aari}{ARI}
-\newfontlanguage{Arakanese}{ARK}\newfontlanguage{Assamese}{ASM}
-\newfontlanguage{Athapaskan}{ATH}\newfontlanguage{Avar}{AVR}
-\newfontlanguage{Awadhi}{AWA}\newfontlanguage{Aymara}{AYM}
-\newfontlanguage{Azeri}{AZE}\newfontlanguage{Badaga}{BAD}
-\newfontlanguage{Baghelkhandi}{BAG}\newfontlanguage{Balkar}{BAL}
-\newfontlanguage{Baule}{BAU}\newfontlanguage{Berber}{BBR}
-\newfontlanguage{Bench}{BCH}\newfontlanguage{Bible~Cree}{BCR}
-\newfontlanguage{Belarussian}{BEL}\newfontlanguage{Bemba}{BEM}
-\newfontlanguage{Bengali}{BEN}\newfontlanguage{Bulgarian}{BGR}
-\newfontlanguage{Bhili}{BHI}\newfontlanguage{Bhojpuri}{BHO}
-\newfontlanguage{Bikol}{BIK}\newfontlanguage{Bilen}{BIL}
-\newfontlanguage{Blackfoot}{BKF}\newfontlanguage{Balochi}{BLI}
-\newfontlanguage{Balante}{BLN}\newfontlanguage{Balti}{BLT}
-\newfontlanguage{Bambara}{BMB}\newfontlanguage{Bamileke}{BML}
-\newfontlanguage{Breton}{BRE}\newfontlanguage{Brahui}{BRH}
-\newfontlanguage{Braj~Bhasha}{BRI}\newfontlanguage{Burmese}{BRM}
-\newfontlanguage{Bashkir}{BSH}\newfontlanguage{Beti}{BTI}
-\newfontlanguage{Catalan}{CAT}\newfontlanguage{Cebuano}{CEB}
-\newfontlanguage{Chechen}{CHE}\newfontlanguage{Chaha~Gurage}{CHG}
-\newfontlanguage{Chattisgarhi}{CHH}\newfontlanguage{Chichewa}{CHI}
-\newfontlanguage{Chukchi}{CHK}\newfontlanguage{Chipewyan}{CHP}
-\newfontlanguage{Cherokee}{CHR}\newfontlanguage{Chuvash}{CHU}
-\newfontlanguage{Comorian}{CMR}\newfontlanguage{Coptic}{COP}
-\newfontlanguage{Cree}{CRE}\newfontlanguage{Carrier}{CRR}
-\newfontlanguage{Crimean~Tatar}{CRT}\newfontlanguage{Church~Slavonic}{CSL}
-\newfontlanguage{Czech}{CSY}\newfontlanguage{Danish}{DAN}
-\newfontlanguage{Dargwa}{DAR}\newfontlanguage{Woods~Cree}{DCR}
+
+\newfontlanguage{Abaza}{ABA}
+\newfontlanguage{Abkhazian}{ABK}
+\newfontlanguage{Adyghe}{ADY}
+\newfontlanguage{Afrikaans}{AFK}
+\newfontlanguage{Afar}{AFR}
+\newfontlanguage{Agaw}{AGW}
+\newfontlanguage{Altai}{ALT}
+\newfontlanguage{Amharic}{AMH}
+\newfontlanguage{Arabic}{ARA}
+\newfontlanguage{Aari}{ARI}
+\newfontlanguage{Arakanese}{ARK}
+\newfontlanguage{Assamese}{ASM}
+\newfontlanguage{Athapaskan}{ATH}
+\newfontlanguage{Avar}{AVR}
+\newfontlanguage{Awadhi}{AWA}
+\newfontlanguage{Aymara}{AYM}
+\newfontlanguage{Azeri}{AZE}
+\newfontlanguage{Badaga}{BAD}
+\newfontlanguage{Baghelkhandi}{BAG}
+\newfontlanguage{Balkar}{BAL}
+\newfontlanguage{Baule}{BAU}
+\newfontlanguage{Berber}{BBR}
+\newfontlanguage{Bench}{BCH}
+\newfontlanguage{Bible~Cree}{BCR}
+\newfontlanguage{Belarussian}{BEL}
+\newfontlanguage{Bemba}{BEM}
+\newfontlanguage{Bengali}{BEN}
+\newfontlanguage{Bulgarian}{BGR}
+\newfontlanguage{Bhili}{BHI}
+\newfontlanguage{Bhojpuri}{BHO}
+\newfontlanguage{Bikol}{BIK}
+\newfontlanguage{Bilen}{BIL}
+\newfontlanguage{Blackfoot}{BKF}
+\newfontlanguage{Balochi}{BLI}
+\newfontlanguage{Balante}{BLN}
+\newfontlanguage{Balti}{BLT}
+\newfontlanguage{Bambara}{BMB}
+\newfontlanguage{Bamileke}{BML}
+\newfontlanguage{Breton}{BRE}
+\newfontlanguage{Brahui}{BRH}
+\newfontlanguage{Braj~Bhasha}{BRI}
+\newfontlanguage{Burmese}{BRM}
+\newfontlanguage{Bashkir}{BSH}
+\newfontlanguage{Beti}{BTI}
+\newfontlanguage{Catalan}{CAT}
+\newfontlanguage{Cebuano}{CEB}
+\newfontlanguage{Chechen}{CHE}
+\newfontlanguage{Chaha~Gurage}{CHG}
+\newfontlanguage{Chattisgarhi}{CHH}
+\newfontlanguage{Chichewa}{CHI}
+\newfontlanguage{Chukchi}{CHK}
+\newfontlanguage{Chipewyan}{CHP}
+\newfontlanguage{Cherokee}{CHR}
+\newfontlanguage{Chuvash}{CHU}
+\newfontlanguage{Comorian}{CMR}
+\newfontlanguage{Coptic}{COP}
+\newfontlanguage{Cree}{CRE}
+\newfontlanguage{Carrier}{CRR}
+\newfontlanguage{Crimean~Tatar}{CRT}
+\newfontlanguage{Church~Slavonic}{CSL}
+\newfontlanguage{Czech}{CSY}
+\newfontlanguage{Danish}{DAN}
+\newfontlanguage{Dargwa}{DAR}
+\newfontlanguage{Woods~Cree}{DCR}
\newfontlanguage{German}{DEU}
-\newfontlanguage{Dogri}{DGR}\newfontlanguage{Divehi}{DIV}
-\newfontlanguage{Djerma}{DJR}\newfontlanguage{Dangme}{DNG}
-\newfontlanguage{Dinka}{DNK}\newfontlanguage{Dungan}{DUN}
-\newfontlanguage{Dzongkha}{DZN}\newfontlanguage{Ebira}{EBI}
-\newfontlanguage{Eastern~Cree}{ECR}\newfontlanguage{Edo}{EDO}
-\newfontlanguage{Efik}{EFI}\newfontlanguage{Greek}{ELL}
-\newfontlanguage{English}{ENG}\newfontlanguage{Erzya}{ERZ}
-\newfontlanguage{Spanish}{ESP}\newfontlanguage{Estonian}{ETI}
-\newfontlanguage{Basque}{EUQ}\newfontlanguage{Evenki}{EVK}
-\newfontlanguage{Even}{EVN}\newfontlanguage{Ewe}{EWE}
+\newfontlanguage{Dogri}{DGR}
+\newfontlanguage{Divehi}{DIV}
+\newfontlanguage{Djerma}{DJR}
+\newfontlanguage{Dangme}{DNG}
+\newfontlanguage{Dinka}{DNK}
+\newfontlanguage{Dungan}{DUN}
+\newfontlanguage{Dzongkha}{DZN}
+\newfontlanguage{Ebira}{EBI}
+\newfontlanguage{Eastern~Cree}{ECR}
+\newfontlanguage{Edo}{EDO}
+\newfontlanguage{Efik}{EFI}
+\newfontlanguage{Greek}{ELL}
+\newfontlanguage{English}{ENG}
+\newfontlanguage{Erzya}{ERZ}
+\newfontlanguage{Spanish}{ESP}
+\newfontlanguage{Estonian}{ETI}
+\newfontlanguage{Basque}{EUQ}
+\newfontlanguage{Evenki}{EVK}
+\newfontlanguage{Even}{EVN}
+\newfontlanguage{Ewe}{EWE}
\newfontlanguage{French~Antillean}{FAN}
\newfontlanguage{Farsi}{FAR}
\newfontlanguage{Parsi}{FAR}
\newfontlanguage{Persian}{FAR}
-\newfontlanguage{Finnish}{FIN}\newfontlanguage{Fijian}{FJI}
-\newfontlanguage{Flemish}{FLE}\newfontlanguage{Forest~Nenets}{FNE}
-\newfontlanguage{Fon}{FON}\newfontlanguage{Faroese}{FOS}
-\newfontlanguage{French}{FRA}\newfontlanguage{Frisian}{FRI}
-\newfontlanguage{Friulian}{FRL}\newfontlanguage{Futa}{FTA}
-\newfontlanguage{Fulani}{FUL}\newfontlanguage{Ga}{GAD}
-\newfontlanguage{Gaelic}{GAE}\newfontlanguage{Gagauz}{GAG}
-\newfontlanguage{Galician}{GAL}\newfontlanguage{Garshuni}{GAR}
-\newfontlanguage{Garhwali}{GAW}\newfontlanguage{Ge'ez}{GEZ}
-\newfontlanguage{Gilyak}{GIL}\newfontlanguage{Gumuz}{GMZ}
-\newfontlanguage{Gondi}{GON}\newfontlanguage{Greenlandic}{GRN}
-\newfontlanguage{Garo}{GRO}\newfontlanguage{Guarani}{GUA}
-\newfontlanguage{Gujarati}{GUJ}\newfontlanguage{Haitian}{HAI}
-\newfontlanguage{Halam}{HAL}\newfontlanguage{Harauti}{HAR}
-\newfontlanguage{Hausa}{HAU}\newfontlanguage{Hawaiin}{HAW}
-\newfontlanguage{Hammer-Banna}{HBN}\newfontlanguage{Hiligaynon}{HIL}
-\newfontlanguage{Hindi}{HIN}\newfontlanguage{High~Mari}{HMA}
-\newfontlanguage{Hindko}{HND}\newfontlanguage{Ho}{HO}
-\newfontlanguage{Harari}{HRI}\newfontlanguage{Croatian}{HRV}
-\newfontlanguage{Hungarian}{HUN}\newfontlanguage{Armenian}{HYE}
-\newfontlanguage{Igbo}{IBO}\newfontlanguage{Ijo}{IJO}
-\newfontlanguage{Ilokano}{ILO}\newfontlanguage{Indonesian}{IND}
-\newfontlanguage{Ingush}{ING}\newfontlanguage{Inuktitut}{INU}
-\newfontlanguage{Irish}{IRI}\newfontlanguage{Irish~Traditional}{IRT}
-\newfontlanguage{Icelandic}{ISL}\newfontlanguage{Inari~Sami}{ISM}
-\newfontlanguage{Italian}{ITA}\newfontlanguage{Hebrew}{IWR}
-\newfontlanguage{Javanese}{JAV}\newfontlanguage{Yiddish}{JII}
-\newfontlanguage{Japanese}{JAN}\newfontlanguage{Judezmo}{JUD}
-\newfontlanguage{Jula}{JUL}\newfontlanguage{Kabardian}{KAB}
-\newfontlanguage{Kachchi}{KAC}\newfontlanguage{Kalenjin}{KAL}
-\newfontlanguage{Kannada}{KAN}\newfontlanguage{Karachay}{KAR}
-\newfontlanguage{Georgian}{KAT}\newfontlanguage{Kazakh}{KAZ}
-\newfontlanguage{Kebena}{KEB}\newfontlanguage{Khutsuri~Georgian}{KGE}
-\newfontlanguage{Khakass}{KHA}\newfontlanguage{Khanty-Kazim}{KHK}
-\newfontlanguage{Khmer}{KHM}\newfontlanguage{Khanty-Shurishkar}{KHS}
-\newfontlanguage{Khanty-Vakhi}{KHV}\newfontlanguage{Khowar}{KHW}
-\newfontlanguage{Kikuyu}{KIK}\newfontlanguage{Kirghiz}{KIR}
-\newfontlanguage{Kisii}{KIS}\newfontlanguage{Kokni}{KKN}
-\newfontlanguage{Kalmyk}{KLM}\newfontlanguage{Kamba}{KMB}
-\newfontlanguage{Kumaoni}{KMN}\newfontlanguage{Komo}{KMO}
-\newfontlanguage{Komso}{KMS}\newfontlanguage{Kanuri}{KNR}
-\newfontlanguage{Kodagu}{KOD}\newfontlanguage{Korean~Old~Hangul}{KOH}
-\newfontlanguage{Konkani}{KOK}\newfontlanguage{Kikongo}{KON}
-\newfontlanguage{Komi-Permyak}{KOP}\newfontlanguage{Korean}{KOR}
-\newfontlanguage{Komi-Zyrian}{KOZ}\newfontlanguage{Kpelle}{KPL}
-\newfontlanguage{Krio}{KRI}\newfontlanguage{Karakalpak}{KRK}
-\newfontlanguage{Karelian}{KRL}\newfontlanguage{Karaim}{KRM}
-\newfontlanguage{Karen}{KRN}\newfontlanguage{Koorete}{KRT}
-\newfontlanguage{Kashmiri}{KSH}\newfontlanguage{Khasi}{KSI}
-\newfontlanguage{Kildin~Sami}{KSM}\newfontlanguage{Kui}{KUI}
-\newfontlanguage{Kulvi}{KUL}\newfontlanguage{Kumyk}{KUM}
-\newfontlanguage{Kurdish}{KUR}\newfontlanguage{Kurukh}{KUU}
-\newfontlanguage{Kuy}{KUY}\newfontlanguage{Koryak}{KYK}
-\newfontlanguage{Ladin}{LAD}\newfontlanguage{Lahuli}{LAH}
-\newfontlanguage{Lak}{LAK}\newfontlanguage{Lambani}{LAM}
-\newfontlanguage{Lao}{LAO}\newfontlanguage{Latin}{LAT}
-\newfontlanguage{Laz}{LAZ}\newfontlanguage{L-Cree}{LCR}
-\newfontlanguage{Ladakhi}{LDK}\newfontlanguage{Lezgi}{LEZ}
-\newfontlanguage{Lingala}{LIN}\newfontlanguage{Low~Mari}{LMA}
-\newfontlanguage{Limbu}{LMB}\newfontlanguage{Lomwe}{LMW}
-\newfontlanguage{Lower~Sorbian}{LSB}\newfontlanguage{Lule~Sami}{LSM}
-\newfontlanguage{Lithuanian}{LTH}\newfontlanguage{Luba}{LUB}
-\newfontlanguage{Luganda}{LUG}\newfontlanguage{Luhya}{LUH}
-\newfontlanguage{Luo}{LUO}\newfontlanguage{Latvian}{LVI}
-\newfontlanguage{Majang}{MAJ}\newfontlanguage{Makua}{MAK}
-\newfontlanguage{Malayalam~Traditional}{MAL}\newfontlanguage{Mansi}{MAN}
-\newfontlanguage{Marathi}{MAR}\newfontlanguage{Marwari}{MAW}
-\newfontlanguage{Mbundu}{MBN}\newfontlanguage{Manchu}{MCH}
-\newfontlanguage{Moose~Cree}{MCR}\newfontlanguage{Mende}{MDE}
-\newfontlanguage{Me'en}{MEN}\newfontlanguage{Mizo}{MIZ}
-\newfontlanguage{Macedonian}{MKD}\newfontlanguage{Male}{MLE}
-\newfontlanguage{Malagasy}{MLG}\newfontlanguage{Malinke}{MLN}
-\newfontlanguage{Malayalam~Reformed}{MLR}\newfontlanguage{Malay}{MLY}
-\newfontlanguage{Mandinka}{MND}\newfontlanguage{Mongolian}{MNG}
-\newfontlanguage{Manipuri}{MNI}\newfontlanguage{Maninka}{MNK}
-\newfontlanguage{Manx~Gaelic}{MNX}\newfontlanguage{Moksha}{MOK}
-\newfontlanguage{Moldavian}{MOL}\newfontlanguage{Mon}{MON}
-\newfontlanguage{Moroccan}{MOR}\newfontlanguage{Maori}{MRI}
-\newfontlanguage{Maithili}{MTH}\newfontlanguage{Maltese}{MTS}
-\newfontlanguage{Mundari}{MUN}\newfontlanguage{Naga-Assamese}{NAG}
-\newfontlanguage{Nanai}{NAN}\newfontlanguage{Naskapi}{NAS}
-\newfontlanguage{N-Cree}{NCR}\newfontlanguage{Ndebele}{NDB}
-\newfontlanguage{Ndonga}{NDG}\newfontlanguage{Nepali}{NEP}
-\newfontlanguage{Newari}{NEW}\newfontlanguage{Nagari}{NGR}
-\newfontlanguage{Norway~House~Cree}{NHC}\newfontlanguage{Nisi}{NIS}
-\newfontlanguage{Niuean}{NIU}\newfontlanguage{Nkole}{NKL}
-\newfontlanguage{N'ko}{NKO}\newfontlanguage{Dutch}{NLD}
-\newfontlanguage{Nogai}{NOG}\newfontlanguage{Norwegian}{NOR}
-\newfontlanguage{Northern~Sami}{NSM}\newfontlanguage{Northern~Tai}{NTA}
-\newfontlanguage{Esperanto}{NTO}\newfontlanguage{Nynorsk}{NYN}
-\newfontlanguage{Oji-Cree}{OCR}\newfontlanguage{Ojibway}{OJB}
-\newfontlanguage{Oriya}{ORI}\newfontlanguage{Oromo}{ORO}
-\newfontlanguage{Ossetian}{OSS}\newfontlanguage{Palestinian~Aramaic}{PAA}
-\newfontlanguage{Pali}{PAL}\newfontlanguage{Punjabi}{PAN}
-\newfontlanguage{Palpa}{PAP}\newfontlanguage{Pashto}{PAS}
-\newfontlanguage{Polytonic~Greek}{PGR}\newfontlanguage{Pilipino}{PIL}
-\newfontlanguage{Palaung}{PLG}\newfontlanguage{Polish}{PLK}
-\newfontlanguage{Provencal}{PRO}\newfontlanguage{Portuguese}{PTG}
-\newfontlanguage{Chin}{QIN}\newfontlanguage{Rajasthani}{RAJ}
-\newfontlanguage{R-Cree}{RCR}\newfontlanguage{Russian~Buriat}{RBU}
-\newfontlanguage{Riang}{RIA}\newfontlanguage{Rhaeto-Romanic}{RMS}
-\newfontlanguage{Romanian}{ROM}\newfontlanguage{Romany}{ROY}
-\newfontlanguage{Rusyn}{RSY}\newfontlanguage{Ruanda}{RUA}
-\newfontlanguage{Russian}{RUS}\newfontlanguage{Sadri}{SAD}
-\newfontlanguage{Sanskrit}{SAN}\newfontlanguage{Santali}{SAT}
-\newfontlanguage{Sayisi}{SAY}\newfontlanguage{Sekota}{SEK}
-\newfontlanguage{Selkup}{SEL}\newfontlanguage{Sango}{SGO}
-\newfontlanguage{Shan}{SHN}\newfontlanguage{Sibe}{SIB}
-\newfontlanguage{Sidamo}{SID}\newfontlanguage{Silte~Gurage}{SIG}
-\newfontlanguage{Skolt~Sami}{SKS}\newfontlanguage{Slovak}{SKY}
-\newfontlanguage{Slavey}{SLA}\newfontlanguage{Slovenian}{SLV}
-\newfontlanguage{Somali}{SML}\newfontlanguage{Samoan}{SMO}
-\newfontlanguage{Sena}{SNA}\newfontlanguage{Sindhi}{SND}
-\newfontlanguage{Sinhalese}{SNH}\newfontlanguage{Soninke}{SNK}
-\newfontlanguage{Sodo~Gurage}{SOG}\newfontlanguage{Sotho}{SOT}
-\newfontlanguage{Albanian}{SQI}\newfontlanguage{Serbian}{SRB}
-\newfontlanguage{Saraiki}{SRK}\newfontlanguage{Serer}{SRR}
-\newfontlanguage{South~Slavey}{SSL}\newfontlanguage{Southern~Sami}{SSM}
-\newfontlanguage{Suri}{SUR}\newfontlanguage{Svan}{SVA}
-\newfontlanguage{Swedish}{SVE}\newfontlanguage{Swadaya~Aramaic}{SWA}
-\newfontlanguage{Swahili}{SWK}\newfontlanguage{Swazi}{SWZ}
-\newfontlanguage{Sutu}{SXT}\newfontlanguage{Syriac}{SYR}
-\newfontlanguage{Tabasaran}{TAB}\newfontlanguage{Tajiki}{TAJ}
-\newfontlanguage{Tamil}{TAM}\newfontlanguage{Tatar}{TAT}
-\newfontlanguage{TH-Cree}{TCR}\newfontlanguage{Telugu}{TEL}
-\newfontlanguage{Tongan}{TGN}\newfontlanguage{Tigre}{TGR}
-\newfontlanguage{Tigrinya}{TGY}\newfontlanguage{Thai}{THA}
-\newfontlanguage{Tahitian}{THT}\newfontlanguage{Tibetan}{TIB}
-\newfontlanguage{Turkmen}{TKM}\newfontlanguage{Temne}{TMN}
-\newfontlanguage{Tswana}{TNA}\newfontlanguage{Tundra~Nenets}{TNE}
-\newfontlanguage{Tonga}{TNG}\newfontlanguage{Todo}{TOD}
-\newfontlanguage{Tsonga}{TSG}\newfontlanguage{Turoyo~Aramaic}{TUA}
-\newfontlanguage{Tulu}{TUL}\newfontlanguage{Tuvin}{TUV}
-\newfontlanguage{Twi}{TWI}\newfontlanguage{Udmurt}{UDM}
-\newfontlanguage{Ukrainian}{UKR}\newfontlanguage{Urdu}{URD}
-\newfontlanguage{Upper~Sorbian}{USB}\newfontlanguage{Uyghur}{UYG}
-\newfontlanguage{Uzbek}{UZB}\newfontlanguage{Venda}{VEN}
-\newfontlanguage{Vietnamese}{VIT}\newfontlanguage{Wa}{WA}
-\newfontlanguage{Wagdi}{WAG}\newfontlanguage{West-Cree}{WCR}
-\newfontlanguage{Welsh}{WEL}\newfontlanguage{Wolof}{WLF}
-\newfontlanguage{Tai~Lue}{XBD}\newfontlanguage{Xhosa}{XHS}
-\newfontlanguage{Yakut}{YAK}\newfontlanguage{Yoruba}{YBA}
-\newfontlanguage{Y-Cree}{YCR}\newfontlanguage{Yi~Classic}{YIC}
-\newfontlanguage{Yi~Modern}{YIM}\newfontlanguage{Chinese~Hong~Kong}{ZHH}
+\newfontlanguage{Finnish}{FIN}
+\newfontlanguage{Fijian}{FJI}
+\newfontlanguage{Flemish}{FLE}
+\newfontlanguage{Forest~Nenets}{FNE}
+\newfontlanguage{Fon}{FON}
+\newfontlanguage{Faroese}{FOS}
+\newfontlanguage{French}{FRA}
+\newfontlanguage{Frisian}{FRI}
+\newfontlanguage{Friulian}{FRL}
+\newfontlanguage{Futa}{FTA}
+\newfontlanguage{Fulani}{FUL}
+\newfontlanguage{Ga}{GAD}
+\newfontlanguage{Gaelic}{GAE}
+\newfontlanguage{Gagauz}{GAG}
+\newfontlanguage{Galician}{GAL}
+\newfontlanguage{Garshuni}{GAR}
+\newfontlanguage{Garhwali}{GAW}
+\newfontlanguage{Ge'ez}{GEZ}
+\newfontlanguage{Gilyak}{GIL}
+\newfontlanguage{Gumuz}{GMZ}
+\newfontlanguage{Gondi}{GON}
+\newfontlanguage{Greenlandic}{GRN}
+\newfontlanguage{Garo}{GRO}
+\newfontlanguage{Guarani}{GUA}
+\newfontlanguage{Gujarati}{GUJ}
+\newfontlanguage{Haitian}{HAI}
+\newfontlanguage{Halam}{HAL}
+\newfontlanguage{Harauti}{HAR}
+\newfontlanguage{Hausa}{HAU}
+\newfontlanguage{Hawaiin}{HAW}
+\newfontlanguage{Hammer-Banna}{HBN}
+\newfontlanguage{Hiligaynon}{HIL}
+\newfontlanguage{Hindi}{HIN}
+\newfontlanguage{High~Mari}{HMA}
+\newfontlanguage{Hindko}{HND}
+\newfontlanguage{Ho}{HO}
+\newfontlanguage{Harari}{HRI}
+\newfontlanguage{Croatian}{HRV}
+\newfontlanguage{Hungarian}{HUN}
+\newfontlanguage{Armenian}{HYE}
+\newfontlanguage{Igbo}{IBO}
+\newfontlanguage{Ijo}{IJO}
+\newfontlanguage{Ilokano}{ILO}
+\newfontlanguage{Indonesian}{IND}
+\newfontlanguage{Ingush}{ING}
+\newfontlanguage{Inuktitut}{INU}
+\newfontlanguage{Irish}{IRI}
+\newfontlanguage{Irish~Traditional}{IRT}
+\newfontlanguage{Icelandic}{ISL}
+\newfontlanguage{Inari~Sami}{ISM}
+\newfontlanguage{Italian}{ITA}
+\newfontlanguage{Hebrew}{IWR}
+\newfontlanguage{Javanese}{JAV}
+\newfontlanguage{Yiddish}{JII}
+\newfontlanguage{Japanese}{JAN}
+\newfontlanguage{Judezmo}{JUD}
+\newfontlanguage{Jula}{JUL}
+\newfontlanguage{Kabardian}{KAB}
+\newfontlanguage{Kachchi}{KAC}
+\newfontlanguage{Kalenjin}{KAL}
+\newfontlanguage{Kannada}{KAN}
+\newfontlanguage{Karachay}{KAR}
+\newfontlanguage{Georgian}{KAT}
+\newfontlanguage{Kazakh}{KAZ}
+\newfontlanguage{Kebena}{KEB}
+\newfontlanguage{Khutsuri~Georgian}{KGE}
+\newfontlanguage{Khakass}{KHA}
+\newfontlanguage{Khanty-Kazim}{KHK}
+\newfontlanguage{Khmer}{KHM}
+\newfontlanguage{Khanty-Shurishkar}{KHS}
+\newfontlanguage{Khanty-Vakhi}{KHV}
+\newfontlanguage{Khowar}{KHW}
+\newfontlanguage{Kikuyu}{KIK}
+\newfontlanguage{Kirghiz}{KIR}
+\newfontlanguage{Kisii}{KIS}
+\newfontlanguage{Kokni}{KKN}
+\newfontlanguage{Kalmyk}{KLM}
+\newfontlanguage{Kamba}{KMB}
+\newfontlanguage{Kumaoni}{KMN}
+\newfontlanguage{Komo}{KMO}
+\newfontlanguage{Komso}{KMS}
+\newfontlanguage{Kanuri}{KNR}
+\newfontlanguage{Kodagu}{KOD}
+\newfontlanguage{Korean~Old~Hangul}{KOH}
+\newfontlanguage{Konkani}{KOK}
+\newfontlanguage{Kikongo}{KON}
+\newfontlanguage{Komi-Permyak}{KOP}
+\newfontlanguage{Korean}{KOR}
+\newfontlanguage{Komi-Zyrian}{KOZ}
+\newfontlanguage{Kpelle}{KPL}
+\newfontlanguage{Krio}{KRI}
+\newfontlanguage{Karakalpak}{KRK}
+\newfontlanguage{Karelian}{KRL}
+\newfontlanguage{Karaim}{KRM}
+\newfontlanguage{Karen}{KRN}
+\newfontlanguage{Koorete}{KRT}
+\newfontlanguage{Kashmiri}{KSH}
+\newfontlanguage{Khasi}{KSI}
+\newfontlanguage{Kildin~Sami}{KSM}
+\newfontlanguage{Kui}{KUI}
+\newfontlanguage{Kulvi}{KUL}
+\newfontlanguage{Kumyk}{KUM}
+\newfontlanguage{Kurdish}{KUR}
+\newfontlanguage{Kurukh}{KUU}
+\newfontlanguage{Kuy}{KUY}
+\newfontlanguage{Koryak}{KYK}
+\newfontlanguage{Ladin}{LAD}
+\newfontlanguage{Lahuli}{LAH}
+\newfontlanguage{Lak}{LAK}
+\newfontlanguage{Lambani}{LAM}
+\newfontlanguage{Lao}{LAO}
+\newfontlanguage{Latin}{LAT}
+\newfontlanguage{Laz}{LAZ}
+\newfontlanguage{L-Cree}{LCR}
+\newfontlanguage{Ladakhi}{LDK}
+\newfontlanguage{Lezgi}{LEZ}
+\newfontlanguage{Lingala}{LIN}
+\newfontlanguage{Low~Mari}{LMA}
+\newfontlanguage{Limbu}{LMB}
+\newfontlanguage{Lomwe}{LMW}
+\newfontlanguage{Lower~Sorbian}{LSB}
+\newfontlanguage{Lule~Sami}{LSM}
+\newfontlanguage{Lithuanian}{LTH}
+\newfontlanguage{Luba}{LUB}
+\newfontlanguage{Luganda}{LUG}
+\newfontlanguage{Luhya}{LUH}
+\newfontlanguage{Luo}{LUO}
+\newfontlanguage{Latvian}{LVI}
+\newfontlanguage{Majang}{MAJ}
+\newfontlanguage{Makua}{MAK}
+\newfontlanguage{Malayalam~Traditional}{MAL}
+\newfontlanguage{Mansi}{MAN}
+\newfontlanguage{Marathi}{MAR}
+\newfontlanguage{Marwari}{MAW}
+\newfontlanguage{Mbundu}{MBN}
+\newfontlanguage{Manchu}{MCH}
+\newfontlanguage{Moose~Cree}{MCR}
+\newfontlanguage{Mende}{MDE}
+\newfontlanguage{Me'en}{MEN}
+\newfontlanguage{Mizo}{MIZ}
+\newfontlanguage{Macedonian}{MKD}
+\newfontlanguage{Male}{MLE}
+\newfontlanguage{Malagasy}{MLG}
+\newfontlanguage{Malinke}{MLN}
+\newfontlanguage{Malayalam~Reformed}{MLR}
+\newfontlanguage{Malay}{MLY}
+\newfontlanguage{Mandinka}{MND}
+\newfontlanguage{Mongolian}{MNG}
+\newfontlanguage{Manipuri}{MNI}
+\newfontlanguage{Maninka}{MNK}
+\newfontlanguage{Manx~Gaelic}{MNX}
+\newfontlanguage{Moksha}{MOK}
+\newfontlanguage{Moldavian}{MOL}
+\newfontlanguage{Mon}{MON}
+\newfontlanguage{Moroccan}{MOR}
+\newfontlanguage{Maori}{MRI}
+\newfontlanguage{Maithili}{MTH}
+\newfontlanguage{Maltese}{MTS}
+\newfontlanguage{Mundari}{MUN}
+\newfontlanguage{Naga-Assamese}{NAG}
+\newfontlanguage{Nanai}{NAN}
+\newfontlanguage{Naskapi}{NAS}
+\newfontlanguage{N-Cree}{NCR}
+\newfontlanguage{Ndebele}{NDB}
+\newfontlanguage{Ndonga}{NDG}
+\newfontlanguage{Nepali}{NEP}
+\newfontlanguage{Newari}{NEW}
+\newfontlanguage{Nagari}{NGR}
+\newfontlanguage{Norway~House~Cree}{NHC}
+\newfontlanguage{Nisi}{NIS}
+\newfontlanguage{Niuean}{NIU}
+\newfontlanguage{Nkole}{NKL}
+\newfontlanguage{N'ko}{NKO}
+\newfontlanguage{Dutch}{NLD}
+\newfontlanguage{Nogai}{NOG}
+\newfontlanguage{Norwegian}{NOR}
+\newfontlanguage{Northern~Sami}{NSM}
+\newfontlanguage{Northern~Tai}{NTA}
+\newfontlanguage{Esperanto}{NTO}
+\newfontlanguage{Nynorsk}{NYN}
+\newfontlanguage{Oji-Cree}{OCR}
+\newfontlanguage{Ojibway}{OJB}
+\newfontlanguage{Oriya}{ORI}
+\newfontlanguage{Oromo}{ORO}
+\newfontlanguage{Ossetian}{OSS}
+\newfontlanguage{Palestinian~Aramaic}{PAA}
+\newfontlanguage{Pali}{PAL}
+\newfontlanguage{Punjabi}{PAN}
+\newfontlanguage{Palpa}{PAP}
+\newfontlanguage{Pashto}{PAS}
+\newfontlanguage{Polytonic~Greek}{PGR}
+\newfontlanguage{Pilipino}{PIL}
+\newfontlanguage{Palaung}{PLG}
+\newfontlanguage{Polish}{PLK}
+\newfontlanguage{Provencal}{PRO}
+\newfontlanguage{Portuguese}{PTG}
+\newfontlanguage{Chin}{QIN}
+\newfontlanguage{Rajasthani}{RAJ}
+\newfontlanguage{R-Cree}{RCR}
+\newfontlanguage{Russian~Buriat}{RBU}
+\newfontlanguage{Riang}{RIA}
+\newfontlanguage{Rhaeto-Romanic}{RMS}
+\newfontlanguage{Romanian}{ROM}
+\newfontlanguage{Romany}{ROY}
+\newfontlanguage{Rusyn}{RSY}
+\newfontlanguage{Ruanda}{RUA}
+\newfontlanguage{Russian}{RUS}
+\newfontlanguage{Sadri}{SAD}
+\newfontlanguage{Sanskrit}{SAN}
+\newfontlanguage{Santali}{SAT}
+\newfontlanguage{Sayisi}{SAY}
+\newfontlanguage{Sekota}{SEK}
+\newfontlanguage{Selkup}{SEL}
+\newfontlanguage{Sango}{SGO}
+\newfontlanguage{Shan}{SHN}
+\newfontlanguage{Sibe}{SIB}
+\newfontlanguage{Sidamo}{SID}
+\newfontlanguage{Silte~Gurage}{SIG}
+\newfontlanguage{Skolt~Sami}{SKS}
+\newfontlanguage{Slovak}{SKY}
+\newfontlanguage{Slavey}{SLA}
+\newfontlanguage{Slovenian}{SLV}
+\newfontlanguage{Somali}{SML}
+\newfontlanguage{Samoan}{SMO}
+\newfontlanguage{Sena}{SNA}
+\newfontlanguage{Sindhi}{SND}
+\newfontlanguage{Sinhalese}{SNH}
+\newfontlanguage{Soninke}{SNK}
+\newfontlanguage{Sodo~Gurage}{SOG}
+\newfontlanguage{Sotho}{SOT}
+\newfontlanguage{Albanian}{SQI}
+\newfontlanguage{Serbian}{SRB}
+\newfontlanguage{Saraiki}{SRK}
+\newfontlanguage{Serer}{SRR}
+\newfontlanguage{South~Slavey}{SSL}
+\newfontlanguage{Southern~Sami}{SSM}
+\newfontlanguage{Suri}{SUR}
+\newfontlanguage{Svan}{SVA}
+\newfontlanguage{Swedish}{SVE}
+\newfontlanguage{Swadaya~Aramaic}{SWA}
+\newfontlanguage{Swahili}{SWK}
+\newfontlanguage{Swazi}{SWZ}
+\newfontlanguage{Sutu}{SXT}
+\newfontlanguage{Syriac}{SYR}
+\newfontlanguage{Tabasaran}{TAB}
+\newfontlanguage{Tajiki}{TAJ}
+\newfontlanguage{Tamil}{TAM}
+\newfontlanguage{Tatar}{TAT}
+\newfontlanguage{TH-Cree}{TCR}
+\newfontlanguage{Telugu}{TEL}
+\newfontlanguage{Tongan}{TGN}
+\newfontlanguage{Tigre}{TGR}
+\newfontlanguage{Tigrinya}{TGY}
+\newfontlanguage{Thai}{THA}
+\newfontlanguage{Tahitian}{THT}
+\newfontlanguage{Tibetan}{TIB}
+\newfontlanguage{Turkmen}{TKM}
+\newfontlanguage{Temne}{TMN}
+\newfontlanguage{Tswana}{TNA}
+\newfontlanguage{Tundra~Nenets}{TNE}
+\newfontlanguage{Tonga}{TNG}
+\newfontlanguage{Todo}{TOD}
+\newfontlanguage{Tsonga}{TSG}
+\newfontlanguage{Turoyo~Aramaic}{TUA}
+\newfontlanguage{Tulu}{TUL}
+\newfontlanguage{Tuvin}{TUV}
+\newfontlanguage{Twi}{TWI}
+\newfontlanguage{Udmurt}{UDM}
+\newfontlanguage{Ukrainian}{UKR}
+\newfontlanguage{Urdu}{URD}
+\newfontlanguage{Upper~Sorbian}{USB}
+\newfontlanguage{Uyghur}{UYG}
+\newfontlanguage{Uzbek}{UZB}
+\newfontlanguage{Venda}{VEN}
+\newfontlanguage{Vietnamese}{VIT}
+\newfontlanguage{Wa}{WA}
+\newfontlanguage{Wagdi}{WAG}
+\newfontlanguage{West-Cree}{WCR}
+\newfontlanguage{Welsh}{WEL}
+\newfontlanguage{Wolof}{WLF}
+\newfontlanguage{Tai~Lue}{XBD}
+\newfontlanguage{Xhosa}{XHS}
+\newfontlanguage{Yakut}{YAK}
+\newfontlanguage{Yoruba}{YBA}
+\newfontlanguage{Y-Cree}{YCR}
+\newfontlanguage{Yi~Classic}{YIC}
+\newfontlanguage{Yi~Modern}{YIM}
+\newfontlanguage{Chinese~Hong~Kong}{ZHH}
\newfontlanguage{Chinese~Phonetic}{ZHP}
\newfontlanguage{Chinese~Simplified}{ZHS}
-\newfontlanguage{Chinese~Traditional}{ZHT}\newfontlanguage{Zande}{ZND}
+\newfontlanguage{Chinese~Traditional}{ZHT}
+\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
-\keys_define:nn {fontspec}
- {
- Language / Turkish .code:n =
- {
- \fontspec_check_lang:nTF {TRK}
- {
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TRK}
- }
- {
- \fontspec_check_lang:nTF {TUR}
- {
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TUR}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {Turkish}
- \keys_set:nn {fontspec} {Language=Default}
- }
- }
- }
- }
-\__fontspec_keys_define_code:nnn {fontspec}{ Language / Default }
- {
- \tl_set:Nn \l_fontspec_lang_tl {DFLT}
- \int_zero:N \l_fontspec_language_int
- }
-\__fontspec_keys_define_code:nnn {fontspec} {RawFeature}
- {
- \__fontspec_update_featstr:n {#1}
- }
+
+
+\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
+\providecommand\UnicodeFontName[2]{"#1:#2"}
+\providecommand\UnicodeFontTeXLigatures{+tlig;}
+\providecommand\add@unicode@accent[2]{#2\char#1\relax}
+\providecommand\DeclareUnicodeAccent[3]{%
+ \DeclareTextCommand{#1}{#2}{\add@unicode@accent{#3}}%
+}
+\DeclareDocumentCommand \EncodingCommand {mO{}m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingCommand }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}[#2]{#3}
+ }
+\DeclareDocumentCommand \EncodingAccent {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingAccent }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}{\add@unicode@accent{#2}}
+ }
+\DeclareDocumentCommand \EncodingSymbol {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingSymbol }
+ \DeclareTextSymbol{#1}{\UnicodeEncodingName}{#2}
+ }
+\DeclareDocumentCommand \EncodingComposite {mmm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingComposite }
+ \DeclareTextComposite{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+\DeclareDocumentCommand \EncodingCompositeCommand {mmm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingCompositeCommand }
+ \DeclareTextCompositeCommand{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+\DeclareDocumentCommand \DeclareUnicodeEncoding {mm}
+ {
+ \DeclareFontEncoding{#1}{}{}
+ \DeclareErrorFont{#1}{lmr}{m}{n}{10}
+ \DeclareFontSubstitution{#1}{lmr}{m}{n}
+ \DeclareFontFamily{#1}{lmr}{}
+
+ \DeclareFontShape{#1}{lmr}{m}{n}
+ {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{it}
+ {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{sc}
+ {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{n}
+ {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{it}
+ {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+
+ \tl_set_eq:NN \l__fontspec_prev_unicode_name_tl \UnicodeEncodingName
+ \tl_set:Nn \UnicodeEncodingName {#1}
+ \bool_set_true:N \l__fontspec_defining_encoding_bool
+ #2
+ \bool_set_false:N \l__fontspec_defining_encoding_bool
+ \tl_set_eq:NN \UnicodeEncodingName \l__fontspec_prev_unicode_name_tl
+ }
+\DeclareDocumentCommand \UndeclareSymbol {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareSymbol }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+
+\DeclareDocumentCommand \UndeclareComposite {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareComposite }
+ \cs_undefine:c
+ { \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
+ }
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -2585,7 +3221,7 @@
\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
\cs_set:Npn \zf@fontspec #1 #2
{
- \fontspec_select:nn {#1} {#2}
+ \__fontspec_select_font_family:nn {#1} {#2}
\tl_set:Nn \zf@family { \l_fontspec_family_tl }
\tl_set:Nn \zf@basefont { \l_fontspec_font }
}
@@ -2646,27 +3282,45 @@
\not@math@alphabet\upshape\relax
\fontspec_merge_shape:n\updefault
}
-\int_new:N \l__fontspec_em_int
-\int_new:N \l__fontspec_emdef_int
\cs_new_protected:Npn \emfontdeclare #1
{
- \int_zero:N \l__fontspec_emdef_int
- \clist_map_inline:nn {#1}
- {
- \int_incr:N \l__fontspec_emdef_int
- \cs_set:cpn {__fontspec_em_font_ \int_use:N \l__fontspec_emdef_int _switch:} {##1}
- }
+ \prop_clear:N \g__fontspec_em_prop
+ \int_zero:N \l__fontspec_emdef_int
+ \group_begin:
+ \normalfont
+ \clist_map_inline:nn {\emreset,#1}
+ {
+ ##1
+ \prop_gput:NxV \g__fontspec_em_prop { \f@series/\f@shape } { \l__fontspec_emdef_int }
+ \prop_gput:Nxn \g__fontspec_em_prop { switch-\int_use:N \l__fontspec_emdef_int } { ##1 }
+ \int_incr:N \l__fontspec_emdef_int
+ }
+ \group_end:
}
\DeclareRobustCommand \em
{
\@nomath\em
+
+ \prop_get:NxNT \g__fontspec_em_prop { \f@series/\f@shape } \l__fontspec_em_tmp_tl
+ { \int_set:Nn \l__fontspec_em_int { \l__fontspec_em_tmp_tl } }
+
\int_incr:N \l__fontspec_em_int
- \use:c {__fontspec_em_font_ \int_use:N \l__fontspec_em_int _switch:}
+
+ \prop_get:NxNTF \g__fontspec_em_prop { switch-\int_use:N \l__fontspec_em_int } \l__fontspec_em_switch_tl
+ { \l__fontspec_em_switch_tl }
+ {
+ \int_zero:N \l__fontspec_em_int
+ \emreset
+ }
+
}
\DeclareTextFontCommand{\emph}{\em}
+\cs_set:Npn \emreset { \upshape }
\cs_set:Npn \emshape { \itshape }
\cs_set:Npn \eminnershape { \upshape }
\emfontdeclare{ \emshape, \eminnershape }
+\cs_set:Npn \reset@font { \normalfont \int_zero:N \l__fontspec_em_int }
+\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l__fontspec_em_int {#1} }
\DeclareRobustCommand{\-}
{
\discretionary
@@ -2681,7 +3335,7 @@
\def\xlx@defaulthyphenchar{`\-}
\cs_new:Nn \fontspec_visible_space:
{
- \font_glyph_if_exist:NnTF \font {"2423}
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
{ \char"2423\scan_stop: }
{ \fontspec_visible_space_fallback: }
}
@@ -2768,15 +3422,15 @@
{ \addfontfeature{Numbers=Lining} #1 }
}
%% ------------------------------------------------
-%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
+%% Copyright 2004--2017 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
%% 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-example.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
%% ------------------------------------------------
%%
%% End of file `fontspec-luatex.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index 272a2f4257c..c8a4e568aa7 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -5,26 +5,33 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,xetexx')
-%% fontspec-vars.dtx (with options: `vars')
-%% fontspec-msg.dtx (with options: `msg')
+%% fontspec-vars.dtx (with options: `fontspec,xetexx')
+%% fontspec-msg.dtx (with options: `fontspec,xetexx')
%% fontspec-opening.dtx (with options: `fontspec,xetexx')
%% fontspec-fontload.dtx (with options: `fontspec,xetexx')
%% fontspec-user.dtx (with options: `fontspec,xetexx')
%% fontspec-api.dtx (with options: `fontspec,xetexx')
%% fontspec-internal.dtx (with options: `fontspec,xetexx')
+%% fontspec-opentype.dtx (with options: `fontspec,xetexx')
+%% fontspec-graphite.dtx (with options: `fontspec,xetexx')
%% fontspec-keyval.dtx (with options: `fontspec,xetexx')
+%% fontspec-feat-opentype.dtx (with options: `fontspec,xetexx')
+%% fontspec-scripts.dtx (with options: `fontspec,xetexx')
+%% fontspec-lang.dtx (with options: `fontspec,xetexx')
+%% fontspec-feat-aat.dtx (with options: `fontspec,xetexx')
+%% fontspec-enc.dtx (with options: `fontspec,xetexx')
%% fontspec-math.dtx (with options: `fontspec,xetexx')
%% fontspec-closing.dtx (with options: `fontspec,xetexx')
-%% fontspec-patches.dtx (with options: `patches')
+%% fontspec-patches.dtx (with options: `fontspec,xetexx')
%% ------------------------------------------------
%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% (C) 2004--2017 Will Robertson and Khaled Hosny
%% License information appended.
%% ------------------------------------------------
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/01/02}{2.5c}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -43,30 +50,93 @@
\bool_new:N \g__fontspec_cfg_bool
\bool_new:N \g__fontspec_math_bool
\bool_new:N \g__fontspec_euenc_bool
-\int_new:N \l_fontspec_script_int
-\int_new:N \l_fontspec_language_int
-\int_new:N \l_fontspec_strnum_int
+\bool_new:N \l__fontspec_disable_defaults_bool
+\bool_new:N \l__fontspec_alias_bool
+\bool_new:N \l__fontspec_external_bool
+\bool_new:N \l__fontspec_never_check_bool
+\bool_new:N \l__fontspec_defining_encoding_bool
+\bool_new:N \l__fontspec_script_exist_bool
+\int_new:N \l__fontspec_script_int
+\int_new:N \l__fontspec_language_int
+\int_new:N \l__fontspec_strnum_int
+\int_new:N \l__fontspec_tmp_int
+\int_new:N \l__fontspec_em_int
+\int_new:N \l__fontspec_emdef_int
\fp_new:N \l__fontspec_tmpa_fp
\fp_new:N \l__fontspec_tmpb_fp
\dim_new:N \l__fontspec_tmpa_dim
\dim_new:N \l__fontspec_tmpb_dim
\dim_new:N \l__fontspec_tmpc_dim
-\tl_set:Nx \c_colon_str { \tl_to_str:N : }
-\cs_set:Npn \use_v:nnnnn #1#2#3#4#5 {#5}
-\cs_set:Npn \use_iv:nnnnn #1#2#3#4#5 {#4}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\seq_new:N \g__fontspec_bf_series_seq
+\clist_new:N \g__fontspec_default_fontopts_clist
+\clist_new:N \g__fontspec_all_keyval_modules_clist
+\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
+\prop_new:N \g__fontspec_fontopts_prop
+\prop_new:N \l__fontspec_nfss_prop
+\prop_new:N \l__fontspec_nfssfont_prop
+\prop_new:N \g__fontspec_OT_features_prop
+\prop_new:N \g__fontspec_all_opentype_feature_names_prop
+\prop_new:N \g__fontspec_em_prop
+\tl_new:N \g__fontspec_mathrm_tl
+\tl_new:N \g__fontspec_bfmathrm_tl
+\tl_new:N \g__fontspec_mathsf_tl
+\tl_new:N \g__fontspec_mathtt_tl
+\tl_new:N \l__fontspec_family_label_tl
+\tl_new:N \l__fontspec_fake_slant_tl
+\tl_new:N \l__fontspec_fake_embolden_tl
+\tl_new:N \l__fontspec_fontname_up_tl
+\tl_new:N \l__fontspec_fontname_bf_tl
+\tl_new:N \l__fontspec_fontname_it_tl
+\tl_new:N \l__fontspec_fontname_bfit_tl
+\tl_new:N \l__fontspec_fontname_sl_tl
+\tl_new:N \l__fontspec_fontname_bfsl_tl
+\tl_new:N \l__fontspec_fontname_sc_tl
+\tl_new:N \l__fontspec_fontfeat_up_clist
+\tl_new:N \l__fontspec_fontfeat_bf_clist
+\tl_new:N \l__fontspec_fontfeat_it_clist
+\tl_new:N \l__fontspec_fontfeat_bfit_clist
+\tl_new:N \l__fontspec_fontfeat_sl_clist
+\tl_new:N \l__fontspec_fontfeat_bfsl_clist
+\tl_new:N \l__fontspec_fontfeat_sc_clist
+\tl_new:N \l__fontspec_script_name_tl
+\tl_new:N \l_fontspec_script_tl
+\tl_new:N \l__fontspec_lang_name_tl
+\tl_new:N \l_fontspec_lang_tl
+\tl_new:N \g__fontspec_hexcol_tl
+\tl_new:N \g__fontspec_opacity_tl
+\tl_set:Nn \g__fontspec_hexcol_tl {000000}
+\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
+\cs_new:Nn \__fontspec_keys_set_known:nnN
+ {
+ \keys_set_known:nnN {#1} {#2} #3
+ }
+\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
+\cs_set:Npn \__fontspec_head_ii:n #1 { \__fontspec_head_ii:w #1 *** \q_stop}
+\cs_set:Npn \__fontspec_head_ii:w #1#2#3 \q_stop { #1#2 }
+\cs_generate_variant:Nn \__fontspec_head_ii:n {o}
\cs_new:Nn \__fontspec_int_mult_truncate:Nn
{
\int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
+\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
\cs_new:Npn \__fontspec_warning:n { \msg_warning:nn {fontspec} }
\cs_new:Npn \__fontspec_warning:nx { \msg_warning:nnx {fontspec} }
@@ -75,190 +145,226 @@
\cs_new:Npn \__fontspec_info:nx { \msg_info:nnx {fontspec} }
\cs_new:Npn \__fontspec_info:nxx { \msg_info:nnxx {fontspec} }
\cs_new:Npn \__fontspec_trace:n { \msg_trace:nn {fontspec} }
-\msg_new:nnn {fontspec} {no-size-info}
+\cs_generate_variant:Nn \msg_new:nnn {nnx}
+\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
+\cs_new:Nn \__fontspec_msg_new:nnn
+ { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } }
+\cs_new:Nn \__fontspec_msg_new:nnnn
+ { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } }
+\char_set_catcode_space:n {32}
+\__fontspec_msg_new:nnn {fontspec} {only-inside-encdef}
+ {
+ \exp_not:N#1can only be used in the second argument
+ to \string\DeclareUnicodeEncoding.
+ }
+\__fontspec_msg_new:nnn {fontspec} {only-import-tu}
{
- Size~ information~ must~ be~ supplied.\\
- For~ example,~ SizeFeatures={Size={8-12},...}.
+ The "\string\ImportEncoding" command can only take "TU" as an argument at this stage.
}
-\msg_new:nnnn {fontspec} {font-not-found}
+\__fontspec_msg_new:nnn {fontspec} {no-size-info}
{
- The~ font~ "#1"~ cannot~ be~ found.
+ Size information must be supplied.\\
+ For example, SizeFeatures={Size={8-12},...}.
}
+\__fontspec_msg_new:nnnn {fontspec} {font-not-found}
{
- A~font~might~not~be~found~for~many~reasons.\\
- Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\
- When~in~doubt,~ask~someone~for~help!
+ The font "#1" cannot be found.
}
-\msg_new:nnnn {fontspec} {rename-feature-not-exist}
{
- The~ feature~ #1~ doesn't~ appear~ to~ be~ defined.
+ A font might not be found for many reasons.\\
+ Check the spelling, where the font is installed etc. etc.\\\\
+ When in doubt, ask someone for help!
}
+\__fontspec_msg_new:nnnn {fontspec} {rename-feature-not-exist}
{
- It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist.
+ The feature #1 doesn't appear to be defined.
}
-\msg_new:nnn {fontspec} {no-glyph}
{
- '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1.
+ It looks like you're trying to rename a feature that doesn't exist.
}
-\msg_new:nnnn {fontspec} {euler-too-late}
+\__fontspec_msg_new:nnn {fontspec} {no-glyph}
{
- The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec.
+ '\l_fontspec_fontname_tl' does not contain glyph #1.
}
+\__fontspec_msg_new:nnnn {fontspec} {euler-too-late}
{
- fontspec~ only~ overwrites~ euler's~ attempt~ to~
- define~ the~ maths~ text~ fonts~ if~ fontspec~ is~
- loaded~ after~ euler.~ Type~ <return>~ to~ proceed~
- with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc.
+ The euler package must be loaded BEFORE fontspec.
}
-\msg_new:nnnn {fontspec} {no-xcolor}
{
- Cannot~ load~ named~ colours~ without~ the~ xcolor~ package.
+ fontspec only overwrites euler's attempt to
+ define the maths text fonts if fontspec is
+ loaded after euler. Type <return> to proceed
+ with incorrect \string\mathit, \string\mathbf, etc.
}
+\__fontspec_msg_new:nnnn {fontspec} {no-xcolor}
{
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~
- the~ color~ package,~ use~ xcolor~ instead.~ It's~ better.
+ Cannot load named colours without the xcolor package.
}
-\msg_new:nnnn {fontspec} {unknown-color-model}
{
- Error~ loading~ colour~ `#1';~ unknown~ colour~ model.
+ Sorry, I can't do anything to help. Instead of loading
+ the color package, use xcolor instead.
}
+\__fontspec_msg_new:nnnn {fontspec} {unknown-color-model}
{
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~
- to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem.
+ Error loading colour `#1'; unknown colour model.
}
-\msg_new:nnnn {fontspec} {not-in-addfontfeatures}
{
- The~ "#1"~ font~ feature~ cannot~ be~ used~ in~ \string\addfontfeatures.
+ Sorry, I can't do anything to help. Please report this error
+ to my developer with a minimal example that causes the problem.
}
+\__fontspec_msg_new:nnnn {fontspec} {not-in-addfontfeatures}
{
- This~ is~ due~ to~ how~ TeX~ loads~ fonts;~ such~ settings~
- are~ global~ so~ adding~ them~ mid-document~ within~ a~ group~ causes~
- confusion.~ You'll~ need~ to~ define~ multiple~ font~ families~ to~ achieve~
- what~ you~ want.
+ The "#1" font feature cannot be used in \string\addfontfeatures.
}
-\msg_new:nnn {fontspec} {addfontfeatures-ignored}
{
- \string\addfontfeature (s)~ ignored~ \msg_line_context:;~
- it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ a~ fontspec~ command.\\
+ This is due to how TeX loads fonts; such settings
+ are global so adding them mid-document within a group causes
+ confusion. You'll need to define multiple font families to achieve
+ what you want.
+ }
+\__fontspec_msg_new:nnn {fontspec} {tu-clash}
+ {
+ I have found the tuenc.def encoding definition file but the TU encoding is not
+ defined by the LaTeX2e kernel; attempting to correct but you really should update
+ to the latest version of LaTeX2e.
+ }
+\__fontspec_msg_new:nnn {fontspec} {tu-missing}
+ {
+ The TU encoding seems to be missing; please update to the latest version of LaTeX2e.
+ }
+\__fontspec_msg_new:nnn {fontspec} {addfontfeatures-ignored}
+ {
+ \string\addfontfeature (s) ignored \msg_line_context:;
+ it cannot be used with a font that wasn't selected by a fontspec command.\\
\\
- The~ current~ font~ is~ "\use:c{font@name}".\\
+ The current font is "\use:c{font@name}".\\
\int_compare:nTF { \clist_count:n {#1} = 1 }
- { The~ requested~ feature~ is~ "#1". }
- { The~ requested~ features~ are~ "#1". }
+ { The requested feature is "#1". }
+ { The requested features are "#1". }
}
-\msg_new:nnn {fontspec} {feature-option-overwrite}
+\__fontspec_msg_new:nnn {fontspec} {feature-option-overwrite}
{
- Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten.
+ Option '#2' of font feature '#1' overwritten.
}
-\msg_new:nnn {fontspec} {script-not-exist-latn}
+\__fontspec_msg_new:nnn {fontspec} {script-not-exist-latn}
{
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\
- 'Latin'~ script~ used~ instead.
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
+ 'Latin' script used instead.
}
-\msg_new:nnn {fontspec} {script-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {script-not-exist}
{
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.
}
-\msg_new:nnn {fontspec} {aat-feature-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {aat-feature-not-exist}
{
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ AAT~ font~ '\l_fontspec_fontname_tl'.
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for AAT font '\l_fontspec_fontname_tl'.
}
-\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+\__fontspec_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
{
- AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- in~ font~ '\l_fontspec_fontname_tl'.
+ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ in font '\l_fontspec_fontname_tl'.
}
-\msg_new:nnn {fontspec} {icu-feature-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {icu-feature-not-exist}
{
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ OpenType~ font~ '\l_fontspec_fontname_tl'
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for OpenType font '\l_fontspec_fontname_tl'
}
-\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+\__fontspec_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
{
- OpenType~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'~ and~ language~ '\l__fontspec_lang_name_tl'.
+ OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l__fontspec_script_name_tl' and language '\l__fontspec_lang_name_tl'.
}
-\msg_new:nnn {fontspec} {no-opticals}
+\__fontspec_msg_new:nnn {fontspec} {no-opticals}
{
- '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis.
+ '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis.
}
-\msg_new:nnn {fontspec} {language-not-exist}
+\__fontspec_msg_new:nnn {fontspec} {language-not-exist}
{
- Language~ '#1'~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'.\\
- 'Default'~ language~ used~ instead.
+ Language '#1' not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l__fontspec_script_name_tl'.\\
+ 'Default' language used instead.
}
-\msg_new:nnn {fontspec} {only-xetex-feature}
+\__fontspec_msg_new:nnn {fontspec} {only-xetex-feature}
{
- Ignored~ XeTeX~ only~ feature:~ '#1'.
+ Ignored XeTeX only feature: '#1'.
}
-\msg_new:nnn {fontspec} {only-luatex-feature}
+\__fontspec_msg_new:nnn {fontspec} {only-luatex-feature}
{
- Ignored~ LuaTeX~ only~ feature:~ '#1'.
+ Ignored LuaTeX only feature: '#1'.
}
-\msg_new:nnn {fontspec} {no-mapping}
+\__fontspec_msg_new:nnn {fontspec} {no-mapping}
{
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.
+ Input mapping not (yet?) supported in LuaTeX.
}
-\msg_new:nnn {fontspec} {no-mapping-ligtex}
+\__fontspec_msg_new:nnn {fontspec} {no-mapping-ligtex}
{
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\
- Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text".
+ Input mapping not (yet?) supported in LuaTeX.\\
+ Use "Ligatures=TeX" instead of "Mapping=tex-text".
}
-\msg_new:nnn {fontspec} {cm-default-obsolete}
+\__fontspec_msg_new:nnn {fontspec} {cm-default-obsolete}
{
- The~ "cm-default"~ package~ option~ is~ obsolete.
+ The "cm-default" package option is obsolete.
}
-\msg_new:nnn {fontspec} {fakebold-only-xetex}
+\__fontspec_msg_new:nnn {fontspec} {fakebold-only-xetex}
{
- The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
- Option~ ignored.
+ The "FakeBold" and "AutoFakeBold" options are only available with XeLaTeX.\\
+ Option ignored.
}
-\msg_new:nnn {fontspec} {defining-font}
+\__fontspec_msg_new:nnn {fontspec} {font-index-needs-ttc}
{
- Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
- with~ options~ [\l__fontspec_all_features_clist].\\
+ The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
+ Feature ignored.
+ }
+\__fontspec_msg_new:nnn {fontspec} {feat-cannot-remove}
+ {
+ The "#1" feature cannot be deactivated. Request ignored.
+ }
+\__fontspec_msg_new:nnn {fontspec} {defining-font}
+ {
+ Font family '\l_fontspec_family_tl' created for font '#2'
+ with options [\l__fontspec_all_features_clist].\\
\\
- This~ font~ family~ consists~ of~ the~ following~ NFSS~ series/shapes:\\
+ This font family consists of the following NFSS series/shapes:\\
\l_fontspec_defined_shapes_tl
}
-\msg_new:nnn {fontspec} {no-font-shape}
+\__fontspec_msg_new:nnn {fontspec} {no-font-shape}
{
- Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist).
+ Could not resolve font "#1" (it probably doesn't exist).
}
-\msg_new:nnn {fontspec} {set-scale}
+\__fontspec_msg_new:nnn {fontspec} {set-scale}
{
- \l_fontspec_fontname_tl\space scale ~=~ \l__fontspec_scale_tl.
+ \l_fontspec_fontname_tl\space scale = \l__fontspec_scale_tl.
}
-\msg_new:nnn {fontspec} {setup-math}
+\__fontspec_msg_new:nnn {fontspec} {setup-math}
{
- Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this).
+ Adjusting the maths setup (use [no-math] to avoid this).
}
-\msg_new:nnn {fontspec} {no-scripts}
+\__fontspec_msg_new:nnn {fontspec} {no-scripts}
{
- Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information.
+ Font "\l_fontspec_fontname_tl" does not contain any OpenType `Script' information.
}
-\msg_new:nnn {fontspec} {opa-twice}
+\__fontspec_msg_new:nnn {fontspec} {opa-twice}
{
- Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\
- Using~ specification~ "Opacity=#1".
+ Opacity set twice, in both Colour and Opacity.\\
+ Using specification "Opacity=#1".
}
-\msg_new:nnn {fontspec} {opa-twice-col}
+\__fontspec_msg_new:nnn {fontspec} {opa-twice-col}
{
- Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\
- Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF".
+ Opacity set twice, in both Opacity and Colour.\\
+ Using an opacity specification in hex of "#1/FF".
}
-\msg_new:nnn {fontspec} {bad-colour}
+\__fontspec_msg_new:nnn {fontspec} {bad-colour}
{
- Bad~ colour~ declaration~ "#1".~
- Colour~ must~ be~ one~ of:\\
- *~ a~ named~ xcolor~ colour\\
- *~ a~ six-digit~ hex~ colour~ RRGGBB\\
- *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity
+ Bad colour declaration "#1".
+ Colour must be one of:\\
+ * a named xcolor colour\\
+ * a six-digit hex colour RRGGBB\\
+ * an eight-digit hex colour RRGGBBTT with opacity
}
+\char_set_catcode_ignore:n {32}
\DeclareOption{cm-default}
{ \__fontspec_warning:n {cm-default-obsolete} }
\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
@@ -277,20 +383,35 @@
\msg_redirect_module:nnn { fontspec } { warning } { none }
\msg_redirect_module:nnn { fontspec } { info } { none }
}
-\ExecuteOptions{config,math,euenc}
+\ExecuteOptions{config,math,tuenc}
\ProcessOptions*
-\tl_set:Nn \g_fontspec_encoding_tl {TU}
-\file_if_exist:nF {tuenc.def} { \bool_set_true:N \g__fontspec_euenc_bool }
-\bool_if:NT \g__fontspec_euenc_bool
+\bool_if:NF \g__fontspec_euenc_bool
+ {
+ \file_if_exist:nTF {tuenc.def}
+ {
+ \cs_if_exist:cF {T@TU}
+ {
+ \__fontspec_warning:n {tu-clash}
+ \DeclareFontEncoding{TU}{}{}
+ \DeclareFontSubstitution{TU}{lmr}{m}{n}
+ }
+ }
+ {
+ \__fontspec_warning:n {tu-missing}
+ \bool_set_true:N \g__fontspec_euenc_bool
+ }
+ }
+\bool_if:NTF \g__fontspec_euenc_bool
{
\tl_set:Nn \g_fontspec_encoding_tl {EU1}
}
+ { \tl_set:Nn \g_fontspec_encoding_tl { TU } }
\tl_set:Nn \rmdefault {lmr}
\tl_set:Nn \sfdefault {lmss}
\tl_set:Nn \ttdefault {lmtt}
\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
-\normalsize % to overcome the encoding changing the current font size
+\tl_if_in:NnT \@filelist {.cls} { \normalsize }
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
@@ -303,23 +424,19 @@
\RequirePackage{xunicode}
}
-\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
\font #1 = #2 ~at~ #3 \scan_stop:
}
-
\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
{
\global \font #1 = #2 ~at~ #3 \scan_stop:
}
-
\cs_set:Npn \__fontspec_font_suppress_not_found_error:
{
\int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
}
-
-\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+\prg_set_conditional:Nnn \__fontspec_primitive_font_if_null:N {p,TF,T,F}
{
\ifx #1 \nullfont
\prg_return_true:
@@ -327,102 +444,95 @@
\prg_return_false:
\fi
}
-\cs_new:Nn \__fontspec_font_set:Nnn
- {
- \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\cs_new:Nn \__fontspec_font_gset:Nnn
- {
- \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
- {
- \etex_iffontchar:D #1 #2 \scan_stop:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-\cs_new:Nn \__fontspec_pass_args:nnn
- {
- \IfNoValueTF {#2}
- { \__fontspec_post_arg:w {#1} {#3} }
- { #1 {#2} {#3} }
- }
-\NewDocumentCommand \__fontspec_post_arg:w { m m O{} }
- { #1 {#3} {#2} }
-\NewDocumentCommand \fontspec { o m }
- { \__fontspec_pass_args:nnn \__fontspec_fontspec:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_fontspec:nn
+\prg_set_conditional:Nnn \__fontspec_primitive_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_primitive_font_set:Nnn \l__fontspec_primitive_font {#1} {10pt}
+ \__fontspec_primitive_font_if_null:NTF \l__fontspec_primitive_font
+ { \group_end: \prg_return_false: }
+ { \group_end: \prg_return_true: }
+ }
+\prg_new_conditional:Nnn \__fontspec_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
+ {
+ \etex_iffontchar:D #1 #2 \scan_stop:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\NewDocumentCommand \fontspec { O{} m O{} }
{
- \fontspec_set_family:Nnn \f@family {#1} {#2}
+ \fontspec_set_family:Nnn \f@family {#1,#3} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
-\DeclareDocumentCommand \setmainfont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmainfont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmainfont:nn
+\DeclareDocumentCommand \setmainfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \rmdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
-
-\DeclareDocumentCommand \setsansfont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setsansfont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setsansfont:nn
+\DeclareDocumentCommand \setsansfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \sfdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_sffamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
-
-\DeclareDocumentCommand \setmonofont { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmonofont:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmonofont:nn
+\DeclareDocumentCommand \setmonofont { O{} m O{} }
{
- \fontspec_set_family:Nnn \ttdefault {#1}{#2}
+ \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
+ {
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
\cs_set_eq:NN \setromanfont \setmainfont
-\tl_new:N \g__fontspec_mathrm_tl
-\tl_new:N \g__fontspec_bfmathrm_tl
-\tl_new:N \g__fontspec_mathsf_tl
-\tl_new:N \g__fontspec_mathtt_tl
-\DeclareDocumentCommand \setmathrm { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathrm:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathrm:nn
+\DeclareDocumentCommand \setmathrm { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2}
}
-\DeclareDocumentCommand \setboldmathrm { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setboldmathrm:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setboldmathrm:nn
+\DeclareDocumentCommand \setboldmathrm { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2}
}
-\DeclareDocumentCommand \setmathsf { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathsf:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathsf:nn
+\DeclareDocumentCommand \setmathsf { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
}
-\DeclareDocumentCommand \setmathtt { o m }
- { \__fontspec_pass_args:nnn \__fontspec_setmathtt:nn {#1} {#2} }
-
-\cs_new:Nn \__fontspec_setmathtt:nn
+\DeclareDocumentCommand \setmathtt { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
}
@@ -433,12 +543,9 @@
\tl_set:Nn \g__fontspec_mathrm_tl {\rmdefault}
\tl_set:Nn \g__fontspec_mathsf_tl {\sfdefault}
\tl_set:Nn \g__fontspec_mathtt_tl {\ttdefault}
-\DeclareDocumentCommand \newfontfamily { m o m }
- { \__fontspec_pass_args:nnn { \__fontspec_newfontfamily:Nnn #1 } {#2} {#3} }
-
-\cs_new:Nn \__fontspec_newfontfamily:Nnn
+\DeclareDocumentCommand \newfontfamily { m O{} m O{} }
{
- \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2} {#3}
+ \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -449,15 +556,10 @@
}
}
}
-\DeclareDocumentCommand \newfontface { m o m }
- { \__fontspec_pass_args:nnn { \__fontspec_newfontface:Nnn #1 } {#2} {#3} }
-
-\cs_new:Nn \__fontspec_newfontface:Nnn
+\DeclareDocumentCommand \newfontface { m O{} m O{} }
{
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
}
-\clist_new:N \g__fontspec_default_fontopts_clist
-\prop_new:N \g__fontspec_fontopts_prop
\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
{
\IfNoValueTF {#2}
@@ -492,19 +594,6 @@
}
}
}
-\cs_new:Nn \__fontspec_sanitise_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \tl_if_in:NnT #1 {##1}
- {
- \tl_remove_once:Nn #1 {##1}
- \clist_map_break:
- }
- }
- }
-\bool_new:N \l__fontspec_disable_defaults_bool
\DeclareDocumentCommand \addfontfeatures {m}
{
\fontspec_if_fontspec_font:TF
@@ -516,7 +605,7 @@
\bool_set_true:N \l__fontspec_disable_defaults_bool
\use:x
{
- \exp_not:N \fontspec_select:nn
+ \__fontspec_select_font_family:nn
{ \l__fontspec_options_tl , #1 } {\l__fontspec_fontname_tl}
}
\group_end:
@@ -541,49 +630,57 @@
\DeclareDocumentCommand \newAATfeature {mmmm}
{
\keys_if_exist:nnF { fontspec } {#1}
- { \__fontspec_define_font_feature:n {#1} }
+ { \__fontspec_define_aat_feature_group:n {#1} }
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \__fontspec_define_feature_option:nnnnn {#1}{#2}{#3}{#4}{}
+ \__fontspec_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
}
\DeclareDocumentCommand \newopentypefeature {mmm}
{
\keys_if_exist:nnF { fontspec / options } {#1}
- { \__fontspec_define_font_feature:n {#1} }
+ { \__fontspec_define_opentype_feature_group:n {#1} }
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \__fontspec_define_feature_option:nnnnn {#1}{#2}{}{}{#3}
+ \__fontspec_define_opentype_feature:nnn {#1}{#2}{#3}
}
\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
-\bool_new:N \l__fontspec_alias_bool
\DeclareDocumentCommand \aliasfontfeature {mm}
{
\bool_set_false:N \l__fontspec_alias_bool
\clist_map_inline:nn
- { fontspec, fontspec-preparse, fontspec-preparse-external,
+ { fontspec, fontspec-opentype, fontspec-aat, fontspec-preparse, fontspec-preparse-external,
fontspec-preparse-nested, fontspec-renderer }
{
\keys_if_exist:nnT {##1} {#1}
{
\bool_set_true:N \l__fontspec_alias_bool
- \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
+ \keys_define:nn {##1}
+ { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
}
}
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
+\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \bool_set_false:N \l__fontspec_alias_bool
-\cs_set:Nn \__fontspec_alias_font_feature:nnn
- {
- \keys_define:nn {#1}
- { #3 .code:n = { \keys_set:nn {#1} { #2 = {##1} } } }
- }
+ \clist_map_inline:Nn \g__fontspec_all_keyval_modules_clist
+ {
-\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
- { \keys_define:nn { fontspec / #1 } { #3 .meta:n = {#2} } }
+ \keys_if_exist:nnT {##1} {#1}
+ {
+ \bool_set_true:N \l__fontspec_alias_bool
+ \keys_define:nn { ##1 / #1 } { #3 .meta:n = {#2} }
+ }
+ }
+
+ \bool_if:NF \l__fontspec_alias_bool
+ { \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
+ }
\DeclareDocumentCommand \newfontscript {mm}
{
\fontspec_new_script:nn {#1} {#2}
@@ -599,6 +696,31 @@
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+\DeclareDocumentCommand \IfFontFeatureActiveTF {mmm}
+ {
+ \__fontspec_if_font_feature:nTF {#1} {#2} {#3}
+ }
+\prg_new_conditional:Nnn \__fontspec_if_font_feature:n {TF}
+ {
+ \tl_gclear:N \g__fontspec_single_feat_tl
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_init:
+ \bool_set_true:N \l__fontspec_ot_bool
+ \bool_set_true:N \l__fontspec_never_check_bool
+ \bool_set_false:N \l__fontspec_firsttime_bool
+ \clist_clear:N \l__fontspec_fontfeat_clist
+ \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist {#1}
+ \group_end:
+
+
+ \tl_if_empty:NTF \g__fontspec_single_feat_tl { \prg_return_false: }
+ {
+ \exp_args:NV \fontspec_if_current_feature:nTF \g__fontspec_single_feat_tl
+ { \prg_return_true: } { \prg_return_false: }
+ }
+ }
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
\cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
@@ -608,10 +730,10 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\bool_if:NTF \l__fontspec_atsui_bool
{
- \fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
\prg_return_true: \prg_return_false:
}
{
@@ -627,7 +749,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool \prg_return_true: \prg_return_false:
}
@@ -640,20 +762,20 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_script_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_language_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \__fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -668,13 +790,13 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
- \fontspec_iv_str_to_num:Nn \l_fontspec_script_int {#1}
- \fontspec_iv_str_to_num:Nn \l_fontspec_language_int {#2}
- \fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
+ \__fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -685,11 +807,11 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
- \fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -700,15 +822,15 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l_fontspec_script_int {\l__fontspec_tmp_tl}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
\prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -719,13 +841,13 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
- \fontspec_iv_str_to_num:Nn \l_fontspec_script_int {#1}
- \fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
+ \__fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -736,7 +858,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
@@ -753,7 +875,7 @@
\fontspec_if_fontspec_font:TF
{
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
\__fontspec_set_font_type:
\bool_if:NTF \l__fontspec_ot_bool
{
@@ -768,48 +890,103 @@
\cs_new:Nn \fontspec_set_family:Nnn
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
- \fontspec_select:nn {#2}{#3}
+ \__fontspec_select_font_family:nn {#2}{#3}
\tl_set_eq:NN #1 \l_fontspec_family_tl
}
\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
\cs_new:Nn \fontspec_set_fontface:NNnn
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
- \fontspec_select:nn {#3}{#4}
+ \__fontspec_select_font_family:nn {#3}{#4}
\tl_set_eq:NN #1 \l_fontspec_font
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
-\cs_set:Nn \fontspec_select:nn
+\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \__fontspec_init:
+ \__fontspec_if_detect_external:nT {#1} { \__fontspec_font_is_file: }
+ \__fontspec_primitive_font_if_exist:nTF { \__fontspec_construct_font_call:nn {#1} {} }
+ { \group_end: \prg_return_true: }
+ { \group_end: \prg_return_false: }
+ }
+\cs_set_eq:NN \IfFontExistsTF \fontspec_font_if_exist:nTF
+
+\prg_new_conditional:Nnn \fontspec_if_current_feature:n {TF,T,F}
+ {
+ \exp_args:Nxx \tl_if_in:nnTF
+ { \fontname\font } { \tl_to_str:n {#1} }
+ { \prg_return_true: } { \prg_return_false: }%
+ }
+
+\cs_new_protected:Nn \__fontspec_select_font_family:nn
{
\group_begin:
\__fontspec_font_suppress_not_found_error:
\__fontspec_init:
- \tl_set:Nx \l_fontspec_fontname_tl {#2}
- \tl_set:Nx \l_fontspec_fontname_up_tl {#2}
- \tl_set:Nx \l__fontspec_basename_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
+ \__fontspec_if_detect_external:nT {#2}
+ { \keys_set:nn {fontspec-preparse-external} {Path} }
+
+ \__fontspec_init_ttc:n {#2}
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+
\__fontspec_extract_all_features:n {#1}
- \__fontspec_preparse_features:
+ \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
+
+ \__fontspec_preparse_features:
\__fontspec_load_font:
\__fontspec_set_scriptlang:
\__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist {}
\bool_set_false:N \l__fontspec_firsttime_bool
- \__fontspec_save_family:nTF {#2}
+ \__fontspec_save_family_needed:nTF {#2}
{
- \__fontspec_save_fontinfo:
- \__fontspec_find_autofonts:
- \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
- \__fontspec_set_faces:
- \__fontspec_info:nxx {defining-font} {#1} {#2}
+ \__fontspec_save_family:nn {#1} {#2}
}
{
}
\group_end:
}
+\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn
+\cs_new:Nn \__fontspec_sanitise_fontname:Nn
+ {
+ \tl_set:Nx #1 {#2}
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \tl_set:Nn \l__fontspec_extension_tl {##1}
+ \clist_map_break:
+ }
+ }
+ }
+\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
+ {
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \bool_set_false:N \l__fontspec_tmpa_bool
+ \exp_args:Nx % <- this should be handled earlier
+ \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
+ { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
+ }
+ \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ }
+\cs_new:Nn \__fontspec_init_ttc:n
+ {
+ \str_if_eq_x:nnT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ {
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
+ }
\cs_new:Nn \__fontspec_load_external_fontoptions:Nn
{
\__fontspec_sanitise_fontname:Nn #1 {#2}
@@ -843,64 +1020,68 @@
#1
}
}
- \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
}
\cs_new:Nn \__fontspec_preparse_features:
{
- \__fontspec_if_detect_external:VT \l__fontspec_basename_tl
- { \keys_set:nn {fontspec-preparse-external} {ExternalLocation} }
- \keys_set_known:nxN {fontspec-preparse-external}
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
{ \l__fontspec_all_features_clist }
\l__fontspec_keys_leftover_clist
- \tl_set_eq:NN \l_fontspec_fontname_tl \l_fontspec_fontname_up_tl
- \keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
+
+ \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
\l__fontspec_keys_leftover_clist
- \keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
+ \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
\l__fontspec_fontfeat_clist
}
\cs_new:Nn \__fontspec_load_font:
{
- \__fontspec_font_set:Nnn \l_fontspec_font
- { \__fontspec_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
- \__fontspec_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l_fontspec_fontname_up_tl} }
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
\__fontspec_set_font_type:
- \__fontspec_font_gset:Nnn \l_fontspec_font
- { \__fontspec_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
+ \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
}
-\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
+\cs_set:Nn \__fontspec_construct_font_call:nnnnnn
{
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \bool_set_false:N \l__fontspec_tmpa_bool
- \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
- { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
- }
- \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ " \__fontspec_fontname_wrap:n { #1 #2 #3 } #4 #5
+ \str_if_eq_x:nnF {#6}{} {:#6} "
}
-\cs_generate_variant:Nn \__fontspec_if_detect_external:nT {V}
-\cs_set:Nn \__fontspec_fullname:n
+\cs_set:Nn \__fontspec_construct_font_call:nn
{
- \__fontspec_namewrap:n { #1 \l__fontspec_extension_tl }
- \l_fontspec_renderer_tl
- \l__fontspec_optical_size_tl
+ \__fontspec_construct_font_call:nnnnnn
+ {#1}
+ \l__fontspec_extension_tl
+ \l__fontspec_ttc_index_tl
+ \l_fontspec_renderer_tl
+ \l__fontspec_optical_size_tl
+ {#2}
}
+\cs_new:Nn \__fontspec_font_is_name:
+ {
+ \cs_set_eq:NN \__fontspec_fontname_wrap:n \use:n
+ }
+\cs_new:Nn \__fontspec_font_is_file:
+ {
+ \cs_set:Npn \__fontspec_fontname_wrap:n ##1 { [ \l__fontspec_font_path_tl ##1 ] }
+ }
\cs_new:Nn \__fontspec_set_scriptlang:
{
\bool_if:NT \l__fontspec_firsttime_bool
{
\tl_if_empty:NTF \l__fontspec_script_name_tl
{
- \fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:nTF {latn}
{
\tl_set:Nn \l__fontspec_script_name_tl {Latin}
\tl_if_empty:NT \l__fontspec_lang_name_tl
{
\tl_set:Nn \l__fontspec_lang_name_tl {Default}
}
- \keys_set:nx {fontspec} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec} {Language=\l__fontspec_lang_name_tl}
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
}
{
\__fontspec_info:n {no-scripts}
@@ -911,13 +1092,36 @@
{
\tl_set:Nn \l__fontspec_lang_name_tl {Default}
}
- \keys_set:nx {fontspec} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec} {Language=\l__fontspec_lang_name_tl}
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
}
}
}
-\prg_new_conditional:Nnn \__fontspec_save_family:n {TF}
+\cs_set:Nn \__fontspec_get_features:Nn
{
+ \__fontspec_init_fontface:
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#2}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \keys_set:nx {fontspec-opentype} {\l__fontspec_keys_leftover_clist}
+ }
+ {
+ \bool_if:NT \l__fontspec_atsui_bool
+ { \keys_set:nx {fontspec-aat} {\l__fontspec_keys_leftover_clist} }
+ }
+
+ \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
+ { \g__fontspec_hexcol_tl \g__fontspec_opacity_tl }
+ { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
+
+ \tl_set_eq:NN #1 \l__fontspec_rawfeatures_sclist
+ }
+\prg_new_conditional:Nnn \__fontspec_save_family_needed:n {TF}
+ {
+
+
\cs_if_exist:NT \l__fontspec_nfss_fam_tl
{
\cs_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
@@ -941,51 +1145,58 @@
\cs_if_exist:cTF {g__fontspec_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
-\cs_new:Nn \__fontspec_save_fontinfo:
+\cs_new:Nn \__fontspec_save_family:nn
+ {
+ \__fontspec_save_fontinfo:n {#2}
+ \__fontspec_find_autofonts:
+ \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
+ \__fontspec_set_faces:
+ \__fontspec_info:nxx {defining-font} {#1} {#2}
+ }
+\cs_new:Nn \__fontspec_save_fontinfo:n
{
\prop_new:c {g__fontspec_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { \l__fontspec_basename_tl }
+ \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { #1 }
\prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
\prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontdef}
{
- \__fontspec_fullname:n {\l_fontspec_fontname_tl} :
- \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist
+ \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
+ { \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l_fontspec_script_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l_fontspec_language_int
+ \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
\prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
\prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
-
}
\cs_new:Nn \__fontspec_find_autofonts:
{
\bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_it_tl} {/B}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_bf_tl} {/I}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
}
\bool_if:NF \l__fontspec_nobf_bool
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
}
\bool_if:NF \l__fontspec_noit_bool
{
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
}
- \__fontspec_set_autofont:Nnn \l_fontspec_fontname_bfsl_tl {\l_fontspec_fontname_sl_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
}
\cs_new:Nn \__fontspec_set_faces:
{
\__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
\prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
}
@@ -994,6 +1205,25 @@
\fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
\__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
}
+\cs_set:Nn \fontspec_complete_fontname:Nn
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
+ }
+\cs_new:Nn \__fontspec_add_nfssfont:nnnn
+ {
+ \tl_set:Nx \l__fontspec_this_font_tl {#3}
+
+ \tl_if_empty:xTF {#4}
+ { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
+ { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
+
+ \tl_if_empty:NF \l__fontspec_this_font_tl
+ {
+ \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
+ { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
+ }
+ }
\cs_new:Nn \__fontspec_set_font_type:
{
\bool_set_false:N \l__fontspec_tfm_bool
@@ -1021,7 +1251,6 @@
}
}
}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
\cs_new:Nn \__fontspec_set_autofont:Nnn
{
\bool_if:NF \l__fontspec_external_bool
@@ -1040,8 +1269,8 @@
\prg_new_conditional:Nnn \__fontspec_if_autofont:nn {T,TF}
{
- \__fontspec_font_set:Nnn \l_tmpa_font { \__fontspec_fullname:n {#1} } {\f@size pt}
- \__fontspec_font_set:Nnn \l_tmpb_font { \__fontspec_fullname:n {#1#2} } {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f@size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f@size pt}
\str_if_eq_x:nnTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
{ \prg_return_false: }
{ \prg_return_true: }
@@ -1049,7 +1278,7 @@
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
{
\group_begin:
- \keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
\__fontspec_load_fontname:n {#1}
\__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
\group_end:
@@ -1060,8 +1289,8 @@
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
\prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
{ \clist_clear:N \l__fontspec_fontopts_clist }
- \__fontspec_font_set:Nnn \l_fontspec_font {\__fontspec_fullname:n {\l_fontspec_fontname_tl}} {\f@size pt}
- \__fontspec_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font { \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f@size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
}
\cs_new:Nn \__fontspec_declare_shape:nnnn
{
@@ -1069,25 +1298,33 @@
\tl_clear:N \l__fontspec_nfss_sc_tl
\tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
- \exp_args:Nx \clist_map_inline:nn {#4}
- {
+ \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
+
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
+ }
+\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
+\cs_new:Nn \__fontspec_setup_single_size:nn
+ {
\tl_clear:N \l__fontspec_size_tl
\tl_set_eq:NN \l__fontspec_sizedfont_tl \l__fontspec_saved_fontname_tl % in case not spec'ed
- \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n ##1 }
+ \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n #2 }
\l__fontspec_sizing_leftover_clist
\tl_if_empty:NT \l__fontspec_size_tl { \__fontspec_error:n {no-size-info} }
% "normal"
\__fontspec_load_fontname:n {\l__fontspec_sizedfont_tl}
- \__fontspec_setup_nfss:Nnn \l__fontspec_nfss_tl {#3} {}
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_tl {#1} {\l__fontspec_sizing_leftover_clist} {}
% small caps
\clist_set_eq:NN \l__fontspec_fontfeat_curr_clist \l__fontspec_fontfeat_sc_clist
\bool_if:NF \l__fontspec_nosc_bool
{
- \tl_if_empty:NTF \l_fontspec_fontname_sc_tl
+ \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
{
\__fontspec_make_smallcaps:TF
{
@@ -1097,60 +1334,47 @@
\bool_set_true:N \l__fontspec_nosc_bool
}
}
- { \__fontspec_load_fontname:n {\l_fontspec_fontname_sc_tl} }% local for each size
+ { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
}
\bool_if:NF \l__fontspec_nosc_bool
{
- \__fontspec_setup_nfss:Nnn \l__fontspec_nfss_sc_tl {#3} {\l__fontspec_fontfeat_curr_clist}
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
+ {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
}
-
- }
-
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nn {#1} {#2}
- }
-\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
-
-\cs_new:Nn \__fontspec_setup_nfss:Nnn
+ }
+\cs_new:Nn \__fontspec_setup_nfss:Nnnn
{
- \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist
- { #2 , \l__fontspec_sizing_leftover_clist , #3 }
+
+ \__fontspec_get_features:Nn \l__fontspec_rawfeatures_sclist { #2 , #3 , #4 }
\tl_put_right:Nx #1
{
<\l__fontspec_size_tl> \l__fontspec_scale_tl
- \__fontspec_fontwrap:n
- {
- \__fontspec_fullname:n { \l_fontspec_fontname_tl }
- : \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist
- }
+ \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
+ { \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
}
-
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
{
\__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl}
{#1} {#2} {\l__fontspec_nfss_tl}{\l__fontspec_postadjust_tl}
}
-
\cs_new:Nn \__fontspec_declare_shapes_smcaps:nn
{
- \bool_if:NF \l__fontspec_nosc_bool
+ \tl_if_empty:NF \l__fontspec_nfss_sc_tl
{
\__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl} {#1}
{ \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
}
+
\cs_new:Nn \__fontspec_combo_sc_shape:n
{
\tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
{ \tl_use:c { \__fontspec_shape_merge:nn {#1} {\scdefault} } }
{ \scdefault }
}
-
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
{
\group_begin:
@@ -1176,6 +1400,7 @@
{
\tl_gput_right:Nx \l_fontspec_defined_shapes_tl
{
+ \exp_not:n { \\ }
-~ \exp_not:N \str_case:nn {#1/#2}
{
{\mddefault/\updefault} {'normal'~}
@@ -1205,7 +1430,6 @@
}
}
}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
\clist_set:Nn \l__fontspec_pre_feat_sclist
{
\bool_if:NT \l__fontspec_ot_bool
@@ -1217,226 +1441,148 @@
}
}
}
-\cs_set:Nn \__fontspec_get_features:Nn
+\cs_set:Nn \__fontspec_make_ot_smallcaps:TF
{
- \sclist_clear:N \l__fontspec_rawfeatures_sclist
- \tl_clear:N \l__fontspec_scale_tl
- \tl_set_eq:NN \l__fontspec_opacity_tl \g__fontspec_opacity_tl
- \tl_set_eq:NN \l__fontspec_hexcol_tl \g__fontspec_hexcol_tl
- \tl_set_eq:NN \l__fontspec_postadjust_tl \g__fontspec_postadjust_tl
- \tl_clear:N \l__fontspec_wordspace_adjust_tl
- \tl_clear:N \l__fontspec_punctspace_adjust_tl
-
- \keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#2}
- \l__fontspec_keys_leftover_clist
- \keys_set:nx {fontspec} {\l__fontspec_keys_leftover_clist}
- \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
- { \g__fontspec_hexcol_tl \g__fontspec_opacity_tl }
+ \__fontspec_check_ot_feat:nTF {smcp} {#1} {#2}
+ }
+\cs_set:Nn \__fontspec_make_smallcaps:TF
+ {
+ \bool_if:NTF \l__fontspec_ot_bool
+ { \__fontspec_make_ot_smallcaps:TF {#1} {#2} }
{
- \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl }
+ \bool_if:NT \l__fontspec_atsui_bool
+ { \__fontspec_make_AAT_feature_string:nnTF {3}{3} {#1} {#2} }
}
-
- \tl_set_eq:NN #1 \l__fontspec_rawfeatures_sclist
}
-\tl_clear:N \l__fontspec_family_label_tl
-\tl_clear:N \l_fontspec_fontname_bf_tl
-\tl_clear:N \l_fontspec_fontname_it_tl
-\tl_clear:N \l_fontspec_fake_slant_tl
-\tl_clear:N \l_fontspec_fake_embolden_tl
-\tl_clear:N \l_fontspec_fontname_bfit_tl
-\tl_clear:N \l_fontspec_fontname_sl_tl
-\tl_clear:N \l_fontspec_fontname_bfsl_tl
-\tl_clear:N \l_fontspec_fontname_sc_tl
-\tl_clear:N \l__fontspec_fontfeat_up_clist
-\tl_clear:N \l__fontspec_fontfeat_bf_clist
-\tl_clear:N \l__fontspec_fontfeat_it_clist
-\tl_clear:N \l__fontspec_fontfeat_bfit_clist
-\tl_clear:N \l__fontspec_fontfeat_sl_clist
-\tl_clear:N \l__fontspec_fontfeat_bfsl_clist
-\tl_clear:N \l__fontspec_fontfeat_sc_clist
-\tl_clear:N \l__fontspec_script_name_tl
-\tl_clear:N \l_fontspec_script_tl
-\tl_clear:N \l__fontspec_lang_name_tl
-\tl_clear:N \l_fontspec_lang_tl
-\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
-
-\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
-\tl_new:N \g__fontspec_hexcol_tl
-\tl_new:N \g__fontspec_opacity_tl
-\tl_set:Nn \g__fontspec_hexcol_tl {000000}
-\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\cs_new:Nn \__fontspec_update_featstr:n
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ {
+ \tl_gset:Nx \g__fontspec_single_feat_tl { #1 }
+ \tl_gput_right:Nx \l__fontspec_rawfeatures_sclist {#1;}
+ }
+ }
+\cs_new:Nn \__fontspec_remove_clashing_featstr:n
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \tl_gremove_all:Nn \l__fontspec_rawfeatures_sclist {##1;}
+ }
+ }
\cs_set:Npn \__fontspec_init:
{
\bool_set_false:N \l__fontspec_ot_bool
\bool_set_true:N \l__fontspec_firsttime_bool
- \cs_set:Npn \__fontspec_namewrap:n ##1 { ##1 }
+ \__fontspec_font_is_name:
+ \tl_clear:N \l__fontspec_font_path_tl
\tl_clear:N \l__fontspec_optical_size_tl
+ \tl_clear:N \l__fontspec_ttc_index_tl
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
\tl_clear:N \g__fontspec_curr_series_tl
\tl_gset_eq:NN \l__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
- % This is for detecting font families when assigning default features.
- % Replace defaults for the standard families because they're not set in the usual way:
- \exp_args:NV \str_case:nnF {\l__fontspec_family_label_tl}
- {
- {\rmdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_rmfamily_family} }
- {\sfdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_sffamily_family} }
- {\ttdefault} { \tl_set:Nn \l__fontspec_family_label_tl {\g__fontspec_ttfamily_family} }
- }{}
-
}
-\cs_set:Nn \fontspec_make_ot_smallcaps:TF
+\cs_new:Nn \__fontspec_init_fontface:
+ {
+ \tl_clear:N \l__fontspec_rawfeatures_sclist
+ \tl_clear:N \l__fontspec_scale_tl
+ \tl_set_eq:NN \l__fontspec_opacity_tl \g__fontspec_opacity_tl
+ \tl_set_eq:NN \l__fontspec_hexcol_tl \g__fontspec_hexcol_tl
+ \tl_set_eq:NN \l__fontspec_postadjust_tl \g__fontspec_postadjust_tl
+ \tl_clear:N \l__fontspec_wordspace_adjust_tl
+ \tl_clear:N \l__fontspec_punctspace_adjust_tl
+ }
+\cs_set:Nn \__fontspec_iv_str_to_num:Nn
{
- \fontspec_check_ot_feat:nTF {+smcp} {#1} {#2}
+ \__fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil
}
-\cs_set:Nn \__fontspec_make_smallcaps:TF
+\cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
{
- \bool_if:NTF \l__fontspec_ot_bool
- { \fontspec_make_ot_smallcaps:TF {#1} {#2} }
+ \int_set:Nn #1
{
- \bool_if:NT \l__fontspec_atsui_bool
- { \fontspec_make_AAT_feature_string:nnTF {3}{3} {#1} {#2} }
+ `#2 * "1000000
+ + `#3 * "10000
+ + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
+ + \ifx \c_empty_tl #5 32 \else `#5 \fi
}
}
-\cs_set_eq:NN \sclist_clear:N \tl_clear:N
-\cs_new:Nn \sclist_gput_right:Nn
- { \tl_gput_right:Nn #1 {#2;} }
-\cs_generate_variant:Nn \sclist_gput_right:Nn {Nx}
-\cs_new:Nn \__fontspec_update_featstr:n
+\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+\cs_new:Nn \__fontspec_define_opentype_feature_group:n
+ {
+ \keys_define:nn {fontspec-opentype} { #1 .multichoice: }
+ }
+\cs_new:Nn \__fontspec_feat_prop_add:nn
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \prop_if_in:NnF \g__fontspec_OT_features_prop {#1}
+ {
+ \prop_gput:Nnn \g__fontspec_OT_features_prop {#1} {#2}
+ }
+ }
+ }
+\cs_new:Nn \__fontspec_define_opentype_feature:nnnnn
{
- \bool_if:NF \l__fontspec_firsttime_bool
+ \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \keys_define:nn {fontspec-opentype}
{
- \sclist_gput_right:Nx \l__fontspec_rawfeatures_sclist {#1}
+ #1/#2 .code:n = { \__fontspec_make_OT_feature:nnn {#3} {#4} {#5} }
}
}
-\cs_new:Nn \fontspec_make_feature:nnn
+\cs_new:Nn \__fontspec_feat_off:n {#1Off}
+\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
+\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
{
- \bool_if:NTF \l__fontspec_ot_bool
- { \fontspec_make_OT_feature:n {#3} }
- {
- \bool_if:NT \l__fontspec_atsui_bool
- { \fontspec_make_AAT_feature:nn {#1}{#2} }
- }
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
}
-\cs_generate_variant:Nn \fontspec_make_feature:nnn {nnx}
-\cs_new:Nn \fontspec_make_AAT_feature:nn
+\cs_new:Nn \__fontspec_define_opentype_onreset:nnnnn
{
- \tl_if_empty:nTF {#1}
- { \__fontspec_warning:n {aat-feature-not-exist} }
- {
- \fontspec_make_AAT_feature_string:nnTF {#1}{#2}
- {
- \__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
- }
- { \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
- }
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
}
-\cs_new:Nn \fontspec_make_OT_feature:n
- {
- \tl_if_empty:nTF {#1}
- { \__fontspec_warning:n {icu-feature-not-exist} }
- {
- \fontspec_check_ot_feat:nTF {#1}
+\cs_new:Nn \__fontspec_make_OT_feature:nnn
+ {
+
+ \bool_set_true:N \l__fontspec_proceed_bool
+ \bool_set_true:N \l__fontspec_check_feat_bool
+
+ \tl_if_empty:nT {#1} { \bool_set_false:N \l__fontspec_check_feat_bool }
+ \bool_if:NT \l__fontspec_check_feat_bool
{
- \__fontspec_update_featstr:n {#1}
+ \__fontspec_check_ot_feat:nF {#1}
+ {
+ \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1}
+ \bool_set_false:N \l__fontspec_proceed_bool
+ }
}
- { \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
- }
- }
-\cs_new_protected:Nn \fontspec_make_numbered_feature:nn
- {
- \fontspec_check_ot_feat:nTF {#1}
- {
- \__fontspec_update_featstr:n { #1 = #2 }
- }
- { \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
- }
-\cs_generate_variant:Nn \fontspec_make_numbered_feature:nn {xn}
-\cs_new:Nn \__fontspec_define_font_feature:n
- {
- \keys_define:nn {fontspec} { #1 .multichoice: }
- }
-\cs_new:Nn \__fontspec_define_feature_option:nnnnn
- {
- \keys_define:nn {fontspec}
- {
- #1/#2 .code:n = { \fontspec_make_feature:nnn{#3}{#4}{#5} }
- }
- }
-\cs_new:Nn \fontspec_define_numbered_feat:nnnn
- {
- \keys_define:nn {fontspec}
- {
- #1/#2 .code:n =
- { \fontspec_make_numbered_feature:nn {#3}{#4} }
- }
- }
-\prg_new_conditional:Nnn \fontspec_make_AAT_feature_string:nn {TF,T,F}
- {
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
- \tl_if_empty:NTF \l_tmpa_tl
- { \prg_return_false: }
- {
- \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
- {
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
- }
- {
- \int_if_even:nTF {#2}
- {
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
- }
- {
- \tl_set:Nx \l_tmpb_tl
- {
- \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
- }
- \tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
- }
- }
- \tl_if_empty:NTF \l_tmpb_tl
- { \prg_return_false: }
- {
- \tl_set:Nx \l_fontspec_feature_string_tl { \l_tmpa_tl = \l_tmpb_tl }
- \prg_return_true:
- }
- }
- }
-\cs_set:Nn \fontspec_iv_str_to_num:Nn
- {
- \fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil
- }
-\cs_set:Npn \fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
- {
- \int_set:Nn #1
- {
- `#2 * "1000000
- + `#3 * "10000
- + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
- + \ifx \c_empty_tl #5 32 \else `#5 \fi
- }
- }
-\cs_generate_variant:Nn \fontspec_iv_str_to_num:Nn {No}
-\cs_set:Nn \fontspec_v_str_to_num:Nn
- {
- \bool_if:nTF
- {
- \tl_if_head_eq_charcode_p:nN {#2} {+} ||
- \tl_if_head_eq_charcode_p:nN {#2} {-}
- }
- { \fontspec_iv_str_to_num:No #1 { \use_none:n #2 } }
- { \fontspec_iv_str_to_num:Nn #1 {#2} }
- }
-\prg_new_conditional:Nnn \fontspec_check_script:n {TF}
+
+ \bool_if:NT \l__fontspec_proceed_bool
+ {
+ \exp_args:Nx \__fontspec_remove_clashing_featstr:n
+ { #2 , \__fontspec_swap_plus_minus:n {#2} , #3 }
+
+ \__fontspec_update_featstr:n {#2}
+ }
+ }
+\cs_generate_variant:Nn \__fontspec_make_OT_feature:nnn {xxx}
+\cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:NNNNN #1 }
+\cs_new:Nn \__fontspec_swap_plus_minus_aux:NNNNN
+ { \str_case:nn {#1} { {+} {-#2#3#4#5} {-} {+#2#3#4#5} } }
+\prg_new_conditional:Nnn \__fontspec_check_script:n {TF}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
- \fontspec_iv_str_to_num:Nn \l_fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
\int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts \l_fontspec_font }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum \XeTeXOTscripttag\l_fontspec_font \l_tmpa_int = \l_fontspec_strnum_int
+ \ifnum \XeTeXOTscripttag\l_fontspec_font \l_tmpa_int = \l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1445,16 +1591,20 @@
}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-\prg_new_conditional:Nnn \fontspec_check_lang:n {TF}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_lang:n {TF}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
- \fontspec_iv_str_to_num:Nn \l_fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
\int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages \l_fontspec_font \l_fontspec_script_int }
+ { \XeTeXOTcountlanguages \l_fontspec_font \l__fontspec_script_int }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTlanguagetag\l_fontspec_font\l_fontspec_script_int \l_tmpa_int =\l_fontspec_strnum_int
+ \ifnum\XeTeXOTlanguagetag\l_fontspec_font\l__fontspec_script_int \l_tmpa_int =\l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1463,21 +1613,25 @@
}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-\prg_new_conditional:Nnn \fontspec_check_ot_feat:n {TF,T}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:n {TF,F}
+ {
+ \bool_if:NTF \l__fontspec_never_check_bool
+ { \prg_return_true: }
{
\int_set:Nn \l_tmpb_int
{
\XeTeXOTcountfeatures \l_fontspec_font
- \l_fontspec_script_int
- \l_fontspec_language_int
+ \l__fontspec_script_int
+ \l__fontspec_language_int
}
- \fontspec_v_str_to_num:Nn \l_fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTfeaturetag\l_fontspec_font\l_fontspec_script_int\l_fontspec_language_int
- \l_tmpa_int =\l_fontspec_strnum_int
+ \ifnum\XeTeXOTfeaturetag\l_fontspec_font\l__fontspec_script_int\l__fontspec_language_int
+ \l_tmpa_int =\l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1486,35 +1640,221 @@
}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
-
-\cs_new:Nn \__fontspec_keys_define_code:nnn
+ }
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvm}{Above-base~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvs}{Above-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {afrc}{Alternative~Fractions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {akhn}{Akhands}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blwf}{Below-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blwm}{Below-base~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {blws}{Below-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {calt}{Contextual~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {case}{Case-Sensitive~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ccmp}{Glyph~Composition~/~Decomposition}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cfar}{Conjunct~Form~After~Ro}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cjct}{Conjunct~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {clig}{Contextual~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cpct}{Centered~CJK~Punctuation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cpsp}{Capital~Spacing}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cswh}{Contextual~Swash}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {curs}{Cursive~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {cvNN}{Character~Variant~$N$}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {c2pc}{Petite~Capitals~From~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {c2sc}{Small~Capitals~From~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dist}{Distances}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dlig}{Discretionary~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dnom}{Denominators}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {dtls}{Dotless~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {expt}{Expert~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {falt}{Final~Glyph~on~Line~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fin2}{Terminal~Forms~\#2}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fin3}{Terminal~Forms~\#3}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fina}{Terminal~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {flac}{Flattened~accent~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {frac}{Fractions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {fwid}{Full~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {half}{Half~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {haln}{Halant~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {halt}{Alternate~Half~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hist}{Historical~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hkna}{Horizontal~Kana~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hlig}{Historical~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hngl}{Hangul}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hojo}{Hojo~Kanji~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {hwid}{Half~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {init}{Initial~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {isol}{Isolated~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ital}{Italics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jalt}{Justification~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp78}{JIS78~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp83}{JIS83~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp90}{JIS90~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {jp04}{JIS2004~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {kern}{Kerning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {lfbd}{Left~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {liga}{Standard~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ljmo}{Leading~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {lnum}{Lining~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {locl}{Localized~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ltra}{Left-to-right~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ltrm}{Left-to-right~mirrored~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mark}{Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {med2}{Medial~Forms~\#2}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {medi}{Medial~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mgrk}{Mathematical~Greek}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mkmk}{Mark~to~Mark~Positioning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {mset}{Mark~Positioning~via~Substitution}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nalt}{Alternate~Annotation~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nlck}{NLC~Kanji~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {nukt}{Nukta~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {numr}{Numerators}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {onum}{Oldstyle~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {opbd}{Optical~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ordn}{Ordinals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ornm}{Ornaments}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {palt}{Proportional~Alternate~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pcap}{Petite~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pkna}{Proportional~Kana}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pnum}{Proportional~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pref}{Pre-Base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pres}{Pre-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pstf}{Post-base~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {psts}{Post-base~Substitutions}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {pwid}{Proportional~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {qwid}{Quarter~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rand}{Randomize}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rclt}{Required~Contextual~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rkrf}{Rakar~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rlig}{Required~Ligatures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rphf}{Reph~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtbd}{Right~Bounds}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtla}{Right-to-left~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rtlm}{Right-to-left~mirrored~forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ruby}{Ruby~Notation~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {rvrn}{Required~Variation~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {salt}{Stylistic~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {sinf}{Scientific~Inferiors}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {size}{Optical~size}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {smcp}{Small~Capitals}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {smpl}{Simplified~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ssNN}{Stylistic~Set~$N$}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {ssty}{Math~script~style~alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {stch}{Stretching~Glyph~Decomposition}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {subs}{Subscript}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {sups}{Superscript}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {swsh}{Swash}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {titl}{Titling}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tjmo}{Trailing~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tnam}{Traditional~Name~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {tnum}{Tabular~Figures}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {trad}{Traditional~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {twid}{Third~Widths}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {unic}{Unicase}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {valt}{Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vatu}{Vattu~Variants}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vert}{Vertical~Writing}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vhal}{Alternate~Vertical~Half~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vjmo}{Vowel~Jamo~Forms}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vkna}{Vertical~Kana~Alternates}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vkrn}{Vertical~Kerning}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vpal}{Proportional~Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrt2}{Vertical~Alternates~and~Rotation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
+\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+
+
+\cs_new:Nn \__fontspec_define_aat_feature_group:n
+ { \keys_define:nn {fontspec-aat} { #1 .multichoice: } }
+\cs_new:Nn \__fontspec_define_aat_feature:nnnn
+ {
+ \keys_define:nn {fontspec-aat}
+ {
+ #1/#2 .code:n = { \__fontspec_make_AAT_feature:nn {#3}{#4} }
+ }
+ }
+
+\cs_new:Nn \__fontspec_make_AAT_feature:nn
{
- \keys_define:nn {#1} { #2 .code:n = {#3} }
+ \tl_if_empty:nTF {#1}
+ { \__fontspec_warning:n {aat-feature-not-exist} }
+ {
+ \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ {
+ \__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
+ }
+ { \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
+ }
}
+\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:nn {TF,T,F}
+ {
+ \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
+ \tl_if_empty:NTF \l_tmpa_tl
+ { \prg_return_false: }
+ {
+ \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
+ {
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ }
+ {
+ \int_if_even:nTF {#2}
+ {
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ }
+ {
+ \tl_set:Nx \l_tmpb_tl
+ {
+ \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
+ }
+ \tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
+ }
+ }
+ \tl_if_empty:NTF \l_tmpb_tl
+ { \prg_return_false: }
+ {
+ \tl_set:Nx \l_fontspec_feature_string_tl { \l_tmpa_tl = \l_tmpb_tl }
+ \prg_return_true:
+ }
+ }
+ }
+
+\clist_set:Nn \g__fontspec_all_keyval_modules_clist
+ {
+ fontspec, fontspec-opentype, fontspec-aat,
+ fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested,
+ fontspec-renderer
+ }
+\cs_new:Nn \__fontspec_keys_define_code:nnn
+ {
+ \keys_define:nn {#1} { #2 .code:n = {#3} }
+ }
\cs_new:Nn \__fontspec_aff_error:n
{
\__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1}
{ \__fontspec_error:nx {not-in-addfontfeatures} {#1} }
}
-\bool_new:N \l__fontspec_external_bool
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ExternalLocation}
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path}
{
\bool_set_true:N \l__fontspec_nobf_bool
\bool_set_true:N \l__fontspec_noit_bool
\bool_set_true:N \l__fontspec_external_bool
- \cs_set:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
+ \tl_set:Nn \l__fontspec_font_path_tl {#1}
+ \__fontspec_font_is_file:
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
}
-\aliasfontfeature{ExternalLocation}{Path}
+\aliasfontfeature{Path}{ExternalLocation}
+\__fontspec_keys_define_code:nnn {fontspec} {Path} {}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
{
\tl_set:Nn \l__fontspec_extension_tl {#1}
\bool_if:NF \l__fontspec_external_bool
{
- \keys_set:nn {fontspec-preparse-external} {ExternalLocation}
+ \keys_set:nn {fontspec-preparse-external} {Path}
}
}
\tl_clear:N \l__fontspec_extension_tl
+\__fontspec_keys_define_code:nnn {fontspec} {Extension} {}
\keys_define:nn {fontspec-renderer}
{
Renderer .choices:nn =
@@ -1523,6 +1863,7 @@
\int_compare:nTF {\l_keys_choice_int <= 4} {
\tl_set:Nv \l_fontspec_renderer_tl
{ g_fontspec_renderer_tag_ \l_keys_choice_tl }
+ \tl_gset:Nx \g__fontspec_single_feat_tl { \l_fontspec_renderer_tl }
}
{
\__fontspec_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
@@ -1545,7 +1886,16 @@
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
\tl_set:Nn \l__fontspec_lang_name_tl {#1}
}
-\seq_new:N \g__fontspec_bf_series_seq
+\__fontspec_keys_define_code:nnn {fontspec-preparse} {FontIndex}
+ {
+ \str_if_eq_x:nnF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ { \__fontspec_warning:n {font-index-needs-ttc} }
+ \tl_set:Nn \l__fontspec_ttc_index_tl {:#1}
+ }
+\__fontspec_keys_define_code:nnn {fontspec} {FontIndex}
+ {
+ \tl_set:Nn \l__fontspec_ttc_index_tl {:#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
{
\tl_gset:Nx \g__fontspec_curr_series_tl { #1 }
@@ -1553,14 +1903,12 @@
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_up_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {FontName}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_up_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
{
\tl_if_empty:nTF {#1}
@@ -1577,7 +1925,7 @@
\seq_put_right:Nx \g__fontspec_bf_series_seq {\bfdefault}
}
\tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
- { \tl_set_eq:NN \l_fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
+ { \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
\prop_put:NxV \l__fontspec_nfss_prop
@@ -1585,7 +1933,6 @@
}
}
-\prop_new:N \l__fontspec_nfss_prop
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
{
\tl_if_empty:nTF {#1}
@@ -1594,20 +1941,20 @@
}
{
\bool_set_false:N \l__fontspec_noit_bool
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_it_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_bfit_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_sl_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
{
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_bfsl_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
}
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFont}
{
@@ -1617,15 +1964,9 @@
}
{
\bool_set_false:N \l__fontspec_nosc_bool
- \fontspec_complete_fontname:Nn \l_fontspec_fontname_sc_tl {#1}
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
}
}
-\cs_set:Nn \fontspec_complete_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
- }
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
{
\clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
@@ -1700,7 +2041,6 @@
\tl_if_exist:NT \l_fontspec_family_tl
{ \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
}
-\prop_new:N \l__fontspec_nfssfont_prop
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
\tl_set:No \l__fontspec_arg_tl { \use_iii:nnn #1 }
@@ -1718,20 +2058,6 @@
\__fontspec_add_nfssfont:nnnn
{\use_i:nnn #1}{\use_ii:nnn #1}{\l__fontspec_this_font_tl}{\l__fontspec_this_feat_tl}
}
-\cs_new:Nn \__fontspec_add_nfssfont:nnnn
- {
- \tl_set:Nx \l__fontspec_this_font_tl {#3}
-
- \tl_if_empty:xTF {#4}
- { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
- { \keys_set_known:noN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
-
- \tl_if_empty:NF \l__fontspec_this_font_tl
- {
- \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
- { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
- }
- }
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
@@ -1764,7 +2090,7 @@
\settoheight #1
{
\str_if_eq:nnTF {#3} {\font} \rmfamily #3
- \int_case:nnn #2
+ \int_case:nnF #2
{
{5} {x} % x-height
{8} {X} % cap-height
@@ -1841,7 +2167,7 @@
\tl_if_single:nTF {#1}
{ \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
{ \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} }
- \font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
{ \hyphenchar \font = \l_fontspec_hyphenchar_tl \scan_stop: }
@@ -1880,7 +2206,6 @@
\tl_set:Nn \l__fontspec_opacity_tl {#7#8}
}
\aliasfontfeature{Color}{Colour}
-\int_new:N \l__fontspec_tmp_int
\__fontspec_keys_define_code:nnn {fontspec} {Opacity}
{
\int_set:Nn \l__fontspec_tmp_int {255}
@@ -1900,10 +2225,6 @@
{
\__fontspec_update_featstr:n { mapping = #1 }
}
-\__fontspec_keys_define_code:nnn {fontspec} {FeatureFile}
- {
- \__fontspec_update_featstr:n { featurefile = #1 }
- }
\__fontspec_keys_define_code:nnn {fontspec} {Weight}
{
\__fontspec_update_featstr:n{weight=#1}
@@ -1960,17 +2281,17 @@
{
\bool_if:NT \l__fontspec_firsttime_bool
{
- \tl_set:Nn \l_fontspec_fake_slant_tl {#1}
+ \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
\clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
\bool_set_false:N \l__fontspec_noit_bool
- \tl_if_empty:NF \l_fontspec_fake_embolden_tl
+ \tl_if_empty:NF \l__fontspec_fake_embolden_tl
{
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeBold=\l_fontspec_fake_embolden_tl}
+ {FakeBold=\l__fontspec_fake_embolden_tl}
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
},
@@ -1982,154 +2303,247 @@
{
\bool_if:NT \l__fontspec_firsttime_bool
{
- \tl_set:Nn \l_fontspec_fake_embolden_tl {#1}
+ \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
\clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
\bool_set_false:N \l__fontspec_nobf_bool
- \tl_if_empty:NF \l_fontspec_fake_slant_tl
+ \tl_if_empty:NF \l__fontspec_fake_slant_tl
{
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeSlant=\l_fontspec_fake_slant_tl}
+ {FakeSlant=\l__fontspec_fake_slant_tl}
\clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
- \tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
},
AutoFakeBold .default:n = {1.5}
}
-\__fontspec_define_font_feature:n{Ligatures}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Required} {1}{0}{+rlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRequired} {1}{1}{-rlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Common} {1}{2}{+liga}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoCommon} {1}{3}{-liga}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Rare} {1}{4}{+dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRare} {1}{5}{-dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Discretionary} {1}{4}{+dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoDiscretionary}{1}{5}{-dlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Contextual} {}{} {+clig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoContextual} {}{} {-clig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Historic} {}{} {+hlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoHistoric} {}{} {-hlig}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Logos} {1}{6} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoLogos} {1}{7} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Rebus} {1}{8} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoRebus} {1}{9} {}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Diphthong} {1}{10}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoDiphthong} {1}{11}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Squared} {1}{12}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoSquared} {1}{13}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{AbbrevSquared} {1}{14}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoAbbrevSquared}{1}{15}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{Icelandic} {1}{32}{}
-\__fontspec_define_feature_option:nnnnn{Ligatures}{NoIcelandic} {1}{33}{}
-\keys_define:nn {fontspec}
+\__fontspec_keys_define_code:nnn {fontspec} {RawFeature}
{
- Ligatures / TeX .code:n =
- {
- \__fontspec_update_featstr:n { mapping = tex-text }
- }
+ \__fontspec_update_featstr:n {#1}
}
-\__fontspec_define_font_feature:n{Letters}
-\__fontspec_define_feature_option:nnnnn{Letters}{Normal} {3}{0}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{Uppercase} {3}{1}{+case}
-\__fontspec_define_feature_option:nnnnn{Letters}{Lowercase} {3}{2}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{SmallCaps} {3}{3}{+smcp}
-\__fontspec_define_feature_option:nnnnn{Letters}{PetiteCaps} {} {} {+pcap}
-\__fontspec_define_feature_option:nnnnn{Letters}{UppercaseSmallCaps} {} {} {+c2sc}
-\__fontspec_define_feature_option:nnnnn{Letters}{UppercasePetiteCaps}{} {} {+c2pc}
-\__fontspec_define_feature_option:nnnnn{Letters}{InitialCaps} {3}{4}{}
-\__fontspec_define_feature_option:nnnnn{Letters}{Unicase} {} {} {+unic}
-\__fontspec_define_feature_option:nnnnn{Letters}{Random} {} {} {+rand}
-\__fontspec_define_font_feature:n{Numbers}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Monospaced} {6} {0}{+tnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Proportional} {6} {1}{+pnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Lowercase} {21}{0}{+onum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{OldStyle} {21}{0}{+onum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Uppercase} {21}{1}{+lnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{Lining} {21}{1}{+lnum}
-\__fontspec_define_feature_option:nnnnn{Numbers}{SlashedZero} {14}{5}{+zero}
-\__fontspec_define_feature_option:nnnnn{Numbers}{NoSlashedZero}{14}{4}{-zero}
-\luatex_if_engine:T
- {
- \__fontspec_define_feature_option:nnnnn{Numbers}{Arabic}{}{}{+anum}
- }
-\__fontspec_define_font_feature:n {Contextuals}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Swash} {} {} {+cswh}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoSwash} {} {} {-cswh}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Alternate} {} {} {+calt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoAlternate} {} {} {-calt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{WordInitial} {8}{0}{+init}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoWordInitial}{8}{1}{-init}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{WordFinal} {8}{2}{+fina}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoWordFinal} {8}{3}{-fina}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{LineInitial} {8}{4}{}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoLineInitial}{8}{5}{}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{LineFinal} {8}{6}{+falt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoLineFinal} {8}{7}{-falt}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{Inner} {8}{8}{+medi}
-\__fontspec_define_feature_option:nnnnn{Contextuals}{NoInner} {8}{9}{-medi}
-\__fontspec_define_font_feature:n{Diacritics}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Show} {9}{0}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Hide} {9}{1}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{Decompose} {9}{2}{}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{MarkToBase} {}{}{+mark}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoMarkToBase}{}{}{-mark}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{MarkToMark} {}{}{+mkmk}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoMarkToMark}{}{}{-mkmk}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{AboveBase} {}{}{+abvm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoAboveBase} {}{}{-abvm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{BelowBase} {}{}{+blwm}
-\__fontspec_define_feature_option:nnnnn{Diacritics}{NoBelowBase} {}{}{-blwm}
-\__fontspec_define_font_feature:n{Kerning}
-\__fontspec_define_feature_option:nnnnn{Kerning}{Uppercase}{}{}{+cpsp}
-\__fontspec_define_feature_option:nnnnn{Kerning}{On} {}{}{+kern}
-\__fontspec_define_feature_option:nnnnn{Kerning}{Off} {}{}{-kern}
-\__fontspec_define_font_feature:n{VerticalPosition}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Normal} {10}{0}{}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Superior} {10}{1}{+sups}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Inferior} {10}{2}{+subs}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Ordinal} {10}{3}{+ordn}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Numerator} {} {} {+numr}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{Denominator}{} {} {+dnom}
-\__fontspec_define_feature_option:nnnnn{VerticalPosition}{ScientificInferior}{}{}{+sinf}
-\__fontspec_define_font_feature:n{Fractions}
-\__fontspec_define_feature_option:nnnnn{Fractions}{On} {11}{1}{+frac}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Off} {11}{0}{-frac}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Diagonal} {11}{2}{}
-\__fontspec_define_feature_option:nnnnn{Fractions}{Alternate}{} {} {+afrc}
-\__fontspec_define_font_feature:n { Alternate }
-\keys_define:nn {fontspec}
+
+\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
+\__fontspec_feat_prop_add:nn {cvNN} { CharacterVariant\,=\,$N$:$M$ }
+\__fontspec_feat_prop_add:nn {ssNN} { StylisticSet\,=\,$N$ }
+\__fontspec_define_opentype_feature_group:n {Ligatures}
+\__fontspec_define_opentype_feature:nnnnn {Ligatures} {ResetAll} {} {}
+ {
+ +dlig,-dlig,+rlig,-rlig,+liga,-liga,+dlig,-dlig,+clig,-clig,+hlig,-hlig,
+ mapping = tex-text
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Required} {rlig} {rlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Common} {liga} {liga} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Rare} {dlig} {dlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Discretionary} {dlig} {dlig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Contextual} {clig} {clig} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Ligatures} {Historic} {hlig} {hlig} {}
+\__fontspec_define_opentype_onreset:nnnnn {Ligatures} {TeX} {} { mapping = tex-text } {}
+\__fontspec_define_opentype_feature_group:n {Letters}
+\__fontspec_define_opentype_feature:nnnnn {Letters} {ResetAll} {} {}
+ {
+ +case,+smcp,+pcap,+c2sc,+c2pc,+unic,+rand,
+ -case,-smcp,-pcap,-c2sc,-c2pc,-unic,-rand
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Uppercase} {case} {case} {+smcp,+pcap,+c2sc,+c2pc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {SmallCaps} {smcp} {smcp} {+pcap,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {PetiteCaps} {pcap} {pcap} {+smcp,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {UppercaseSmallCaps} {c2sc} {c2sc} {+c2pc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {UppercasePetiteCaps} {c2pc} {c2pc} {+c2sc,+unic,+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Unicase} {unic} {unic} {+rand}
+\__fontspec_define_opentype_onoffreset:nnnnn {Letters} {Random} {rand} {rand} {+unic}
+\__fontspec_define_opentype_feature_group:n {Numbers}
+\__fontspec_define_opentype_feature:nnnnn {Numbers} {ResetAll} {} {}
+ {
+ +tnum,-tnum,
+ +pnum,-pnum,
+ +onum,-onum,
+ +lnum,-lnum,
+ +zero,-zero,
+ +anum,-anum,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Monospaced} {tnum} {tnum} {+pnum,-pnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Proportional} {pnum} {pnum} {+tnum,-tnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Lowercase} {onum} {onum} {+lnum,-lnum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {Uppercase} {lnum} {lnum} {+onum,-onum}
+\__fontspec_define_opentype_onoffreset:nnnnn {Numbers} {SlashedZero} {zero} {zero} {}
+\aliasfontfeatureoption {Numbers} {Lowercase} {OldStyle}
+\aliasfontfeatureoption {Numbers} {Uppercase} {Lining}
+\__fontspec_define_opentype_feature_group:n {VerticalPosition}
+\__fontspec_define_opentype_feature:nnnnn {VerticalPosition} {ResetAll} {} {}
+ {
+ +sups,-sups,
+ +subs,-subs,
+ +ordn,-ordn,
+ +numr,-numr,
+ +dnom,-dnom,
+ +sinf,-sinf,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Superior} {sups} {sups} {+subs,+ordn,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Inferior} {subs} {subs} {+sups,+ordn,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Ordinal} {ordn} {ordn} {+sups,+subs,+numr,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Numerator} {numr} {numr} {+sups,+subs,+ordn,+dnom,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {Denominator} {dnom} {dnom} {+sups,+subs,+ordn,+numr,+sinf}
+\__fontspec_define_opentype_onoffreset:nnnnn {VerticalPosition} {ScientificInferior} {sinf} {sinf} {+sups,+subs,+ordn,+numr,+dnom}
+\__fontspec_define_opentype_feature_group:n {Contextuals}
+\__fontspec_define_opentype_feature:nnnnn {Contextuals} {ResetAll} {} {}
+ {
+ +cswh,-cswh,
+ +calt,-calt,
+ +init,-init,
+ +fina,-fina,
+ +falt,-falt,
+ +medi,-medi,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Swash} {cswh} {cswh} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Alternate} {calt} {calt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {WordInitial} {init} {init} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {WordFinal} {fina} {fina} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {LineFinal} {falt} {falt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Contextuals} {Inner} {medi} {medi} {}
+\__fontspec_define_opentype_feature_group:n {Diacritics}
+\__fontspec_define_opentype_feature:nnnnn {Diacritics} {ResetAll} {} {}
+ {
+ +mark,-mark,
+ +mkmk,-mkmk,
+ +abvm,-abvm,
+ +blwm,-blwm,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToBase} {mark} {mark} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToMark} {mkmk} {mkmk} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {AboveBase} {abvm} {abvm} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Diacritics} {BelowBase} {blwm} {blwm} {}
+\__fontspec_define_opentype_feature_group:n {Kerning}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {ResetAll} {} {}
+ {
+ +cpsp,-cpsp,
+ +kern,-kern,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Kerning} {Uppercase} {cpsp} {cpsp} {}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {On} {kern} {+kern} {-kern}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {Off} {kern} {-kern} {+kern}
+\__fontspec_define_opentype_feature:nnnnn {Kerning} {Reset} {} {} {+kern,-kern}
+\__fontspec_define_opentype_feature_group:n {Fractions}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {ResetAll} {} {}
+ {
+ +frac,-frac,
+ +afrc,-afrc,
+ }
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {On} {frac} {+frac} {}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
+\__fontspec_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
+\__fontspec_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
+
+\__fontspec_define_opentype_feature_group:n {Style}
+\__fontspec_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
+ {
+ +salt,-salt,
+ +ital,-ital,
+ +ruby,-ruby,
+ +swsh,-swsh,
+ +hist,-hist,
+ +titl,-titl,
+ +hkna,-hkna,
+ +vkna,-vkna,
+ +ssty=0,-ssty=0,
+ +ssty=1,-ssty=1,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Alternate} {salt} {salt} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Italic} {ital} {ital} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Ruby} {ruby} {ruby} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Swash} {swsh} {swsh} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Cursive} {swsh} {curs} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {Historic} {hist} {hist} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {TitlingCaps} {titl} {titl} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {HorizontalKana} {hkna} {hkna} {+vkna,+pkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {VerticalKana} {vkna} {vkna} {+hkna,+pkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Style} {ProportionalKana} {pkna} {pkna} {+vkna,+hkna}
+\__fontspec_define_opentype_feature:nnnnn {Style} {MathScript} {ssty} {+ssty=0} {+ssty=1}
+\__fontspec_define_opentype_feature:nnnnn {Style} {MathScriptScript} {ssty} {+ssty=1} {+ssty=0}
+\__fontspec_define_opentype_feature_group:n {CJKShape}
+\__fontspec_define_opentype_feature:nnnnn {CJKShape} {ResetAll} {} {}
+ {
+ +trad,-trad,
+ +smpl,-smpl,
+ +jp78,-jp78,
+ +jp83,-jp83,
+ +jp90,-jp90,
+ +jp04,-jp04,
+ +expt,-expt,
+ +nlck,-nlck,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Traditional} {trad} {trad} {+smpl,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Simplified} {smpl} {smpl} {+trad,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1978} {jp78} {jp78} {+trad,+smpl,+jp83,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1983} {jp83} {jp83} {+trad,+smpl,+jp78,+jp90,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1990} {jp90} {jp90} {+trad,+smpl,+jp78,+jp83,+jp04,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {JIS2004} {jp04} {jp04} {+trad,+smpl,+jp78,+jp83,+jp90,+expt,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {Expert} {expt} {expt} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+nlck}
+\__fontspec_define_opentype_onoffreset:nnnnn {CJKShape} {NLC} {nlck} {nlck} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+expt}
+\__fontspec_define_opentype_feature_group:n {CharacterWidth}
+\__fontspec_define_opentype_feature:nnnnn {CharacterWidth} {ResetAll} {} {}
+ {
+ +pwid,-pwid,
+ +fwid,-fwid,
+ +hwid,-hwid,
+ +twid,-twid,
+ +qwid,-qwid,
+ +palt,-palt,
+ +halt,-halt,
+ }
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Proportional} {pwid} {pwid} {+fwid,+hwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Full} {fwid} {fwid} {+pwid,+hwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Half} {hwid} {hwid} {+pwid,+fwid,+twid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Third} {twid} {twid} {+pwid,+fwid,+hwid,+qwid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {Quarter} {qwid} {qwid} {+pwid,+fwid,+hwid,+twid,+palt,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateProportional} {palt} {palt} {+pwid,+fwid,+hwid,+twid,+qwid,+halt}
+\__fontspec_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateHalf} {halt} {halt} {+pwid,+fwid,+hwid,+twid,+qwid,+palt}
+\__fontspec_define_opentype_feature_group:n {Vertical}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {RotatedGlyphs} {vrt2} {vrt2} {+vrtr,+vert}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {AlternatesForRotation} {vrtr} {vrtr} {+vrt2}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {Alternates} {vert} {vert} {+vrt2}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {KanaAlternates} {vkna} {vkna} {+hkna}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {Kerning} {vkrn} {vkrn} {}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {AlternateMetrics} {valt} {valt} {+vhal,+vpal,+kern}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {HalfMetrics} {vhal} {vhal} {+valt,+vpal,+kern}
+\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
+\__fontspec_define_opentype_feature_group:n {Alternate}
+\keys_define:nn {fontspec-opentype}
{
Alternate .default:n = {0} ,
Alternate / unknown .code:n =
{
\clist_map_inline:nn {#1}
- { \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
}
}
-\cs_set:Nn \fontspec_salt:n { +salt = #1 }
-\__fontspec_define_font_feature:n {Variant}
-\keys_define:nn {fontspec}
+\aliasfontfeature{Alternate}{StylisticAlternates}
+\__fontspec_define_opentype_feature_group:n {Variant}
+\keys_define:nn {fontspec-opentype}
{
Variant .default:n = {0} ,
Variant / unknown .code:n =
{
\clist_map_inline:nn {#1}
- { \fontspec_make_feature:nnx {18}{##1} { +ss \two@digits {##1} } }
+ {
+ \__fontspec_make_OT_feature:xxx { ss \two@digits {##1} } { +ss \two@digits {##1} } {}
+ }
}
}
\aliasfontfeature{Variant}{StylisticSet}
-\__fontspec_define_font_feature:n { CharacterVariant }
+\__fontspec_define_opentype_feature_group:n {CharacterVariant}
\use:x
{
\cs_new:Npn \exp_not:N \fontspec_parse_cv:w
##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
{
- \fontspec_make_numbered_feature:xn
- { +cv \exp_not:N \two@digits {##1} } {##2}
+ \__fontspec_make_OT_feature:xxx
+ { cv \exp_not:N \two@digits {##1} } { +cv \exp_not:N \two@digits {##1} = ##2 } {}
}
- \keys_define:nn {fontspec}
+ \keys_define:nn {fontspec-opentype}
{
CharacterVariant / unknown .code:n =
{
@@ -2141,90 +2555,53 @@
}
}
}
-\__fontspec_define_font_feature:n{Style}
-\__fontspec_define_feature_option:nnnnn{Style}{Alternate} {} {} {+salt}
-\__fontspec_define_feature_option:nnnnn{Style}{Italic} {32}{2}{+ital}
-\__fontspec_define_feature_option:nnnnn{Style}{Ruby} {28}{2}{+ruby}
-\__fontspec_define_feature_option:nnnnn{Style}{Swash} {} {} {+swsh}
-\__fontspec_define_feature_option:nnnnn{Style}{Historic} {} {} {+hist}
-\__fontspec_define_feature_option:nnnnn{Style}{Display} {19}{1}{}
-\__fontspec_define_feature_option:nnnnn{Style}{Engraved} {19}{2}{}
-\__fontspec_define_feature_option:nnnnn{Style}{TitlingCaps} {19}{4}{+titl}
-\__fontspec_define_feature_option:nnnnn{Style}{TallCaps} {19}{5}{}
-\__fontspec_define_feature_option:nnnnn{Style}{HorizontalKana}{} {} {+hkna}
-\__fontspec_define_feature_option:nnnnn{Style}{VerticalKana} {} {} {+vkna}
-\fontspec_define_numbered_feat:nnnn {Style} {MathScript} {+ssty} {0}
-\fontspec_define_numbered_feat:nnnn {Style} {MathScriptScript} {+ssty} {1}
-\__fontspec_define_font_feature:n{CJKShape}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Traditional}{20}{0} {+trad}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Simplified} {20}{1} {+smpl}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1978} {20}{2} {+jp78}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1983} {20}{3} {+jp83}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS1990} {20}{4} {+jp90}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{Expert} {20}{10}{+expt}
-\__fontspec_define_feature_option:nnnnn{CJKShape}{NLC} {20}{13}{+nlck}
-\__fontspec_define_font_feature:n{CharacterWidth}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Proportional}{22}{0}{+pwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Full}{22}{1}{+fwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Half}{22}{2}{+hwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Third}{22}{3}{+twid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Quarter}{22}{4}{+qwid}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{AlternateProportional}{22}{5}{+palt}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{AlternateHalf}{22}{6}{+halt}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{Default}{22}{7}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Off}{24}{0}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Box}{24}{1}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{RoundedBox}{24}{2}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Circle}{24}{3}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackCircle}{24}{4}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Parenthesis}{24}{5}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Period}{24}{6}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{RomanNumerals}{24}{7}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{Diamond}{24}{8}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackSquare}{24}{9}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{BlackRoundSquare}{24}{10}{}
-\__fontspec_define_feature_option:nnnnn{Annotation}{DoubleCircle}{24}{11}{}
-\__fontspec_define_font_feature:n { Annotation }
-\keys_define:nn {fontspec}
+\__fontspec_define_opentype_feature_group:n {Annotation}
+\keys_define:nn {fontspec-opentype}
{
Annotation .default:n = {0} ,
Annotation / unknown .code:n =
{
- \fontspec_make_feature:nnx {}{}{ +nalt=#1 }
+ \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
}
}
-\keys_define:nn {fontspec}
+\__fontspec_define_opentype_feature_group:n {Ornament}
+\keys_define:nn {fontspec-opentype}
{
- Vertical .choice: ,
- Vertical / RotatedGlyphs .code:n =
+ Ornament .default:n = {0} ,
+ Ornament / unknown .code:n =
{
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \fontspec_make_feature:nnn{}{}{+vrt2}
- \__fontspec_update_featstr:n {vertical}
- }
- {
- \__fontspec_update_featstr:n {vertical}
- }
+ \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
}
}
-\keys_define:nn { fontspec } { Script .choice: }
+\keys_define:nn { fontspec-opentype } { Script .choice: }
\cs_new:Nn \fontspec_new_script:nn
{
- \keys_define:nn { fontspec } { Script / #1 .code:n =
+ \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \bool_set_false:N \l__fontspec_script_exist_bool
\clist_map_inline:nn {#2}
{
- \fontspec_check_script:nTF {####1}
+ \__fontspec_check_script:nTF {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
- \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ \bool_set_true:N \l__fontspec_script_exist_bool
+ \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
\clist_map_break:
}
+ { }
+ }
+ \bool_if:NF \l__fontspec_script_exist_bool
+ {
+ \str_if_eq:nnTF {#1} {Latin}
{
- \fontspec_check_script:nTF {latn}
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ {
+ \__fontspec_check_script:nTF {latn}
{
\__fontspec_warning:nx {script-not-exist-latn} {#1}
- \keys_set:nn {fontspec} {Script=Latin}
+ \tl_set:Nn \l_fontspec_script_tl {latn}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
}
{
\__fontspec_warning:nx {script-not-exist} {#1}
@@ -2233,296 +2610,745 @@
}
}
}
-\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
+\keys_define:nn { fontspec-opentype } { Language .choice: }
+\cs_new:Nn \fontspec_new_lang:nn
+ {
+ \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \__fontspec_check_lang:nTF {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec-opentype } { Language = Default }
+ }
+ }
+ }
+\__fontspec_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {DFLT}
+ \int_zero:N \l__fontspec_language_int
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
+ }
+\keys_define:nn {fontspec-opentype}
+ {
+ Language / Turkish .code:n =
+ {
+ \__fontspec_check_lang:nTF {TRK}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TRK}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
+ }
+ {
+ \__fontspec_check_lang:nTF {TUR}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TUR}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {Turkish}
+ \keys_set:nn {fontspec-opentype} {Language=Default}
+ }
+ }
+ }
+ }
+\cs_new:Nn \__fontspec_ot_compat:nn
+ {
+ \aliasfontfeatureoption {#1} {#2Off} {No#2}
+ }
+\__fontspec_ot_compat:nn {Ligatures} {Rare}
+\__fontspec_ot_compat:nn {Ligatures} {Required}
+\__fontspec_ot_compat:nn {Ligatures} {Common}
+\__fontspec_ot_compat:nn {Ligatures} {Discretionary}
+\__fontspec_ot_compat:nn {Ligatures} {Contextual}
+\__fontspec_ot_compat:nn {Ligatures} {Historic}
+\__fontspec_ot_compat:nn {Numbers} {SlashedZero}
+\__fontspec_ot_compat:nn {Contextuals} {Swash}
+\__fontspec_ot_compat:nn {Contextuals} {Alternate}
+\__fontspec_ot_compat:nn {Contextuals} {WordInitial}
+\__fontspec_ot_compat:nn {Contextuals} {WordFinal}
+\__fontspec_ot_compat:nn {Contextuals} {LineFinal}
+\__fontspec_ot_compat:nn {Contextuals} {Inner}
+\__fontspec_ot_compat:nn {Diacritics} {MarkToBase}
+\__fontspec_ot_compat:nn {Diacritics} {MarkToMark}
+\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
+\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
+
+\newfontscript{Arabic}{arab}
+\newfontscript{Armenian}{armn}
\newfontscript{Balinese}{bali}
\newfontscript{Bengali}{bng2,beng}
-\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
-\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
+\newfontscript{Bopomofo}{bopo}
+\newfontscript{Braille}{brai}
+\newfontscript{Buginese}{bugi}
+\newfontscript{Buhid}{buhd}
\newfontscript{Byzantine~Music}{byzm}
\newfontscript{Canadian~Syllabics}{cans}
\newfontscript{Cherokee}{cher}
-\newfontscript{CJK~Ideographic}{hani} \newfontscript{Coptic}{copt}
-\newfontscript{Cypriot~Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
-\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
+\newfontscript{CJK~Ideographic}{hani}
+\newfontscript{Coptic}{copt}
+\newfontscript{Cypriot~Syllabary}{cprt}
+\newfontscript{Cyrillic}{cyrl}
+\newfontscript{Default}{DFLT}
+\newfontscript{Deseret}{dsrt}
\newfontscript{Devanagari}{dev2,deva}
\newfontscript{Ethiopic}{ethi}
-\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
-\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
+\newfontscript{Georgian}{geor}
+\newfontscript{Glagolitic}{glag}
+\newfontscript{Gothic}{goth}
+\newfontscript{Greek}{grek}
\newfontscript{Gujarati}{gjr2,gujr}
\newfontscript{Gurmukhi}{gur2,guru}
-\newfontscript{Hangul~Jamo}{jamo} \newfontscript{Hangul}{hang}
-\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
+\newfontscript{Hangul~Jamo}{jamo}
+\newfontscript{Hangul}{hang}
+\newfontscript{Hanunoo}{hano}
+\newfontscript{Hebrew}{hebr}
\newfontscript{Hiragana~and~Katakana}{kana}
\newfontscript{Javanese}{java}
\newfontscript{Kannada}{knd2,knda}
-\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
-\newfontscript{Lao}{lao~} \newfontscript{Latin}{latn}
-\newfontscript{Limbu}{limb} \newfontscript{Linear~B}{linb}
+\newfontscript{Kharosthi}{khar}
+\newfontscript{Khmer}{khmr}
+\newfontscript{Lao}{lao~}
+\newfontscript{Latin}{latn}
+\newfontscript{Limbu}{limb}
+\newfontscript{Linear~B}{linb}
\newfontscript{Malayalam}{mlm2,mlym}
\newfontscript{Math}{math}
\newfontscript{Mongolian}{mong}
-\newfontscript{Musical~Symbols}{musc} \newfontscript{Myanmar}{mymr}
-\newfontscript{N'ko}{nko~} \newfontscript{Ogham}{ogam}
+\newfontscript{Musical~Symbols}{musc}
+\newfontscript{Myanmar}{mymr}
+\newfontscript{N'ko}{nko~}
+\newfontscript{Ogham}{ogam}
\newfontscript{Old~Italic}{ital}
\newfontscript{Old~Persian~Cuneiform}{xpeo}
\newfontscript{Oriya}{ory2,orya}
\newfontscript{Osmanya}{osma}
-\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
-\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
+\newfontscript{Phags-pa}{phag}
+\newfontscript{Phoenician}{phnx}
+\newfontscript{Runic}{runr}
+\newfontscript{Shavian}{shaw}
\newfontscript{Sinhala}{sinh}
\newfontscript{Sumero-Akkadian~Cuneiform}{xsux}
-\newfontscript{Syloti~Nagri}{sylo} \newfontscript{Syriac}{syrc}
-\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
-\newfontscript{Tai~Le}{tale} \newfontscript{Tai~Lu}{talu}
+\newfontscript{Syloti~Nagri}{sylo}
+\newfontscript{Syriac}{syrc}
+\newfontscript{Tagalog}{tglg}
+\newfontscript{Tagbanwa}{tagb}
+\newfontscript{Tai~Le}{tale}
+\newfontscript{Tai~Lu}{talu}
\newfontscript{Tamil}{tml2,taml}
\newfontscript{Telugu}{tel2,telu}
-\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
-\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
-\newfontscript{Ugaritic~Cuneiform}{ugar}\newfontscript{Yi}{yi~~}
+\newfontscript{Thaana}{thaa}
+\newfontscript{Thai}{thai}
+\newfontscript{Tibetan}{tibt}
+\newfontscript{Tifinagh}{tfng}
+\newfontscript{Ugaritic~Cuneiform}{ugar}
+\newfontscript{Yi}{yi~~}
\newfontscript{Kana}{kana}
\newfontscript{Maths}{math}
\newfontscript{CJK}{hani}
-\keys_define:nn { fontspec } { Language .choice: }
-\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec } { Language / #1 .code:n =
- \fontspec_check_lang:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec } { Language = Default }
- }
- }
- }
-\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}
-\newfontlanguage{Adyghe}{ADY}\newfontlanguage{Afrikaans}{AFK}
-\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
-\newfontlanguage{Altai}{ALT}\newfontlanguage{Amharic}{AMH}
-\newfontlanguage{Arabic}{ARA}\newfontlanguage{Aari}{ARI}
-\newfontlanguage{Arakanese}{ARK}\newfontlanguage{Assamese}{ASM}
-\newfontlanguage{Athapaskan}{ATH}\newfontlanguage{Avar}{AVR}
-\newfontlanguage{Awadhi}{AWA}\newfontlanguage{Aymara}{AYM}
-\newfontlanguage{Azeri}{AZE}\newfontlanguage{Badaga}{BAD}
-\newfontlanguage{Baghelkhandi}{BAG}\newfontlanguage{Balkar}{BAL}
-\newfontlanguage{Baule}{BAU}\newfontlanguage{Berber}{BBR}
-\newfontlanguage{Bench}{BCH}\newfontlanguage{Bible~Cree}{BCR}
-\newfontlanguage{Belarussian}{BEL}\newfontlanguage{Bemba}{BEM}
-\newfontlanguage{Bengali}{BEN}\newfontlanguage{Bulgarian}{BGR}
-\newfontlanguage{Bhili}{BHI}\newfontlanguage{Bhojpuri}{BHO}
-\newfontlanguage{Bikol}{BIK}\newfontlanguage{Bilen}{BIL}
-\newfontlanguage{Blackfoot}{BKF}\newfontlanguage{Balochi}{BLI}
-\newfontlanguage{Balante}{BLN}\newfontlanguage{Balti}{BLT}
-\newfontlanguage{Bambara}{BMB}\newfontlanguage{Bamileke}{BML}
-\newfontlanguage{Breton}{BRE}\newfontlanguage{Brahui}{BRH}
-\newfontlanguage{Braj~Bhasha}{BRI}\newfontlanguage{Burmese}{BRM}
-\newfontlanguage{Bashkir}{BSH}\newfontlanguage{Beti}{BTI}
-\newfontlanguage{Catalan}{CAT}\newfontlanguage{Cebuano}{CEB}
-\newfontlanguage{Chechen}{CHE}\newfontlanguage{Chaha~Gurage}{CHG}
-\newfontlanguage{Chattisgarhi}{CHH}\newfontlanguage{Chichewa}{CHI}
-\newfontlanguage{Chukchi}{CHK}\newfontlanguage{Chipewyan}{CHP}
-\newfontlanguage{Cherokee}{CHR}\newfontlanguage{Chuvash}{CHU}
-\newfontlanguage{Comorian}{CMR}\newfontlanguage{Coptic}{COP}
-\newfontlanguage{Cree}{CRE}\newfontlanguage{Carrier}{CRR}
-\newfontlanguage{Crimean~Tatar}{CRT}\newfontlanguage{Church~Slavonic}{CSL}
-\newfontlanguage{Czech}{CSY}\newfontlanguage{Danish}{DAN}
-\newfontlanguage{Dargwa}{DAR}\newfontlanguage{Woods~Cree}{DCR}
+
+\newfontlanguage{Abaza}{ABA}
+\newfontlanguage{Abkhazian}{ABK}
+\newfontlanguage{Adyghe}{ADY}
+\newfontlanguage{Afrikaans}{AFK}
+\newfontlanguage{Afar}{AFR}
+\newfontlanguage{Agaw}{AGW}
+\newfontlanguage{Altai}{ALT}
+\newfontlanguage{Amharic}{AMH}
+\newfontlanguage{Arabic}{ARA}
+\newfontlanguage{Aari}{ARI}
+\newfontlanguage{Arakanese}{ARK}
+\newfontlanguage{Assamese}{ASM}
+\newfontlanguage{Athapaskan}{ATH}
+\newfontlanguage{Avar}{AVR}
+\newfontlanguage{Awadhi}{AWA}
+\newfontlanguage{Aymara}{AYM}
+\newfontlanguage{Azeri}{AZE}
+\newfontlanguage{Badaga}{BAD}
+\newfontlanguage{Baghelkhandi}{BAG}
+\newfontlanguage{Balkar}{BAL}
+\newfontlanguage{Baule}{BAU}
+\newfontlanguage{Berber}{BBR}
+\newfontlanguage{Bench}{BCH}
+\newfontlanguage{Bible~Cree}{BCR}
+\newfontlanguage{Belarussian}{BEL}
+\newfontlanguage{Bemba}{BEM}
+\newfontlanguage{Bengali}{BEN}
+\newfontlanguage{Bulgarian}{BGR}
+\newfontlanguage{Bhili}{BHI}
+\newfontlanguage{Bhojpuri}{BHO}
+\newfontlanguage{Bikol}{BIK}
+\newfontlanguage{Bilen}{BIL}
+\newfontlanguage{Blackfoot}{BKF}
+\newfontlanguage{Balochi}{BLI}
+\newfontlanguage{Balante}{BLN}
+\newfontlanguage{Balti}{BLT}
+\newfontlanguage{Bambara}{BMB}
+\newfontlanguage{Bamileke}{BML}
+\newfontlanguage{Breton}{BRE}
+\newfontlanguage{Brahui}{BRH}
+\newfontlanguage{Braj~Bhasha}{BRI}
+\newfontlanguage{Burmese}{BRM}
+\newfontlanguage{Bashkir}{BSH}
+\newfontlanguage{Beti}{BTI}
+\newfontlanguage{Catalan}{CAT}
+\newfontlanguage{Cebuano}{CEB}
+\newfontlanguage{Chechen}{CHE}
+\newfontlanguage{Chaha~Gurage}{CHG}
+\newfontlanguage{Chattisgarhi}{CHH}
+\newfontlanguage{Chichewa}{CHI}
+\newfontlanguage{Chukchi}{CHK}
+\newfontlanguage{Chipewyan}{CHP}
+\newfontlanguage{Cherokee}{CHR}
+\newfontlanguage{Chuvash}{CHU}
+\newfontlanguage{Comorian}{CMR}
+\newfontlanguage{Coptic}{COP}
+\newfontlanguage{Cree}{CRE}
+\newfontlanguage{Carrier}{CRR}
+\newfontlanguage{Crimean~Tatar}{CRT}
+\newfontlanguage{Church~Slavonic}{CSL}
+\newfontlanguage{Czech}{CSY}
+\newfontlanguage{Danish}{DAN}
+\newfontlanguage{Dargwa}{DAR}
+\newfontlanguage{Woods~Cree}{DCR}
\newfontlanguage{German}{DEU}
-\newfontlanguage{Dogri}{DGR}\newfontlanguage{Divehi}{DIV}
-\newfontlanguage{Djerma}{DJR}\newfontlanguage{Dangme}{DNG}
-\newfontlanguage{Dinka}{DNK}\newfontlanguage{Dungan}{DUN}
-\newfontlanguage{Dzongkha}{DZN}\newfontlanguage{Ebira}{EBI}
-\newfontlanguage{Eastern~Cree}{ECR}\newfontlanguage{Edo}{EDO}
-\newfontlanguage{Efik}{EFI}\newfontlanguage{Greek}{ELL}
-\newfontlanguage{English}{ENG}\newfontlanguage{Erzya}{ERZ}
-\newfontlanguage{Spanish}{ESP}\newfontlanguage{Estonian}{ETI}
-\newfontlanguage{Basque}{EUQ}\newfontlanguage{Evenki}{EVK}
-\newfontlanguage{Even}{EVN}\newfontlanguage{Ewe}{EWE}
+\newfontlanguage{Dogri}{DGR}
+\newfontlanguage{Divehi}{DIV}
+\newfontlanguage{Djerma}{DJR}
+\newfontlanguage{Dangme}{DNG}
+\newfontlanguage{Dinka}{DNK}
+\newfontlanguage{Dungan}{DUN}
+\newfontlanguage{Dzongkha}{DZN}
+\newfontlanguage{Ebira}{EBI}
+\newfontlanguage{Eastern~Cree}{ECR}
+\newfontlanguage{Edo}{EDO}
+\newfontlanguage{Efik}{EFI}
+\newfontlanguage{Greek}{ELL}
+\newfontlanguage{English}{ENG}
+\newfontlanguage{Erzya}{ERZ}
+\newfontlanguage{Spanish}{ESP}
+\newfontlanguage{Estonian}{ETI}
+\newfontlanguage{Basque}{EUQ}
+\newfontlanguage{Evenki}{EVK}
+\newfontlanguage{Even}{EVN}
+\newfontlanguage{Ewe}{EWE}
\newfontlanguage{French~Antillean}{FAN}
\newfontlanguage{Farsi}{FAR}
\newfontlanguage{Parsi}{FAR}
\newfontlanguage{Persian}{FAR}
-\newfontlanguage{Finnish}{FIN}\newfontlanguage{Fijian}{FJI}
-\newfontlanguage{Flemish}{FLE}\newfontlanguage{Forest~Nenets}{FNE}
-\newfontlanguage{Fon}{FON}\newfontlanguage{Faroese}{FOS}
-\newfontlanguage{French}{FRA}\newfontlanguage{Frisian}{FRI}
-\newfontlanguage{Friulian}{FRL}\newfontlanguage{Futa}{FTA}
-\newfontlanguage{Fulani}{FUL}\newfontlanguage{Ga}{GAD}
-\newfontlanguage{Gaelic}{GAE}\newfontlanguage{Gagauz}{GAG}
-\newfontlanguage{Galician}{GAL}\newfontlanguage{Garshuni}{GAR}
-\newfontlanguage{Garhwali}{GAW}\newfontlanguage{Ge'ez}{GEZ}
-\newfontlanguage{Gilyak}{GIL}\newfontlanguage{Gumuz}{GMZ}
-\newfontlanguage{Gondi}{GON}\newfontlanguage{Greenlandic}{GRN}
-\newfontlanguage{Garo}{GRO}\newfontlanguage{Guarani}{GUA}
-\newfontlanguage{Gujarati}{GUJ}\newfontlanguage{Haitian}{HAI}
-\newfontlanguage{Halam}{HAL}\newfontlanguage{Harauti}{HAR}
-\newfontlanguage{Hausa}{HAU}\newfontlanguage{Hawaiin}{HAW}
-\newfontlanguage{Hammer-Banna}{HBN}\newfontlanguage{Hiligaynon}{HIL}
-\newfontlanguage{Hindi}{HIN}\newfontlanguage{High~Mari}{HMA}
-\newfontlanguage{Hindko}{HND}\newfontlanguage{Ho}{HO}
-\newfontlanguage{Harari}{HRI}\newfontlanguage{Croatian}{HRV}
-\newfontlanguage{Hungarian}{HUN}\newfontlanguage{Armenian}{HYE}
-\newfontlanguage{Igbo}{IBO}\newfontlanguage{Ijo}{IJO}
-\newfontlanguage{Ilokano}{ILO}\newfontlanguage{Indonesian}{IND}
-\newfontlanguage{Ingush}{ING}\newfontlanguage{Inuktitut}{INU}
-\newfontlanguage{Irish}{IRI}\newfontlanguage{Irish~Traditional}{IRT}
-\newfontlanguage{Icelandic}{ISL}\newfontlanguage{Inari~Sami}{ISM}
-\newfontlanguage{Italian}{ITA}\newfontlanguage{Hebrew}{IWR}
-\newfontlanguage{Javanese}{JAV}\newfontlanguage{Yiddish}{JII}
-\newfontlanguage{Japanese}{JAN}\newfontlanguage{Judezmo}{JUD}
-\newfontlanguage{Jula}{JUL}\newfontlanguage{Kabardian}{KAB}
-\newfontlanguage{Kachchi}{KAC}\newfontlanguage{Kalenjin}{KAL}
-\newfontlanguage{Kannada}{KAN}\newfontlanguage{Karachay}{KAR}
-\newfontlanguage{Georgian}{KAT}\newfontlanguage{Kazakh}{KAZ}
-\newfontlanguage{Kebena}{KEB}\newfontlanguage{Khutsuri~Georgian}{KGE}
-\newfontlanguage{Khakass}{KHA}\newfontlanguage{Khanty-Kazim}{KHK}
-\newfontlanguage{Khmer}{KHM}\newfontlanguage{Khanty-Shurishkar}{KHS}
-\newfontlanguage{Khanty-Vakhi}{KHV}\newfontlanguage{Khowar}{KHW}
-\newfontlanguage{Kikuyu}{KIK}\newfontlanguage{Kirghiz}{KIR}
-\newfontlanguage{Kisii}{KIS}\newfontlanguage{Kokni}{KKN}
-\newfontlanguage{Kalmyk}{KLM}\newfontlanguage{Kamba}{KMB}
-\newfontlanguage{Kumaoni}{KMN}\newfontlanguage{Komo}{KMO}
-\newfontlanguage{Komso}{KMS}\newfontlanguage{Kanuri}{KNR}
-\newfontlanguage{Kodagu}{KOD}\newfontlanguage{Korean~Old~Hangul}{KOH}
-\newfontlanguage{Konkani}{KOK}\newfontlanguage{Kikongo}{KON}
-\newfontlanguage{Komi-Permyak}{KOP}\newfontlanguage{Korean}{KOR}
-\newfontlanguage{Komi-Zyrian}{KOZ}\newfontlanguage{Kpelle}{KPL}
-\newfontlanguage{Krio}{KRI}\newfontlanguage{Karakalpak}{KRK}
-\newfontlanguage{Karelian}{KRL}\newfontlanguage{Karaim}{KRM}
-\newfontlanguage{Karen}{KRN}\newfontlanguage{Koorete}{KRT}
-\newfontlanguage{Kashmiri}{KSH}\newfontlanguage{Khasi}{KSI}
-\newfontlanguage{Kildin~Sami}{KSM}\newfontlanguage{Kui}{KUI}
-\newfontlanguage{Kulvi}{KUL}\newfontlanguage{Kumyk}{KUM}
-\newfontlanguage{Kurdish}{KUR}\newfontlanguage{Kurukh}{KUU}
-\newfontlanguage{Kuy}{KUY}\newfontlanguage{Koryak}{KYK}
-\newfontlanguage{Ladin}{LAD}\newfontlanguage{Lahuli}{LAH}
-\newfontlanguage{Lak}{LAK}\newfontlanguage{Lambani}{LAM}
-\newfontlanguage{Lao}{LAO}\newfontlanguage{Latin}{LAT}
-\newfontlanguage{Laz}{LAZ}\newfontlanguage{L-Cree}{LCR}
-\newfontlanguage{Ladakhi}{LDK}\newfontlanguage{Lezgi}{LEZ}
-\newfontlanguage{Lingala}{LIN}\newfontlanguage{Low~Mari}{LMA}
-\newfontlanguage{Limbu}{LMB}\newfontlanguage{Lomwe}{LMW}
-\newfontlanguage{Lower~Sorbian}{LSB}\newfontlanguage{Lule~Sami}{LSM}
-\newfontlanguage{Lithuanian}{LTH}\newfontlanguage{Luba}{LUB}
-\newfontlanguage{Luganda}{LUG}\newfontlanguage{Luhya}{LUH}
-\newfontlanguage{Luo}{LUO}\newfontlanguage{Latvian}{LVI}
-\newfontlanguage{Majang}{MAJ}\newfontlanguage{Makua}{MAK}
-\newfontlanguage{Malayalam~Traditional}{MAL}\newfontlanguage{Mansi}{MAN}
-\newfontlanguage{Marathi}{MAR}\newfontlanguage{Marwari}{MAW}
-\newfontlanguage{Mbundu}{MBN}\newfontlanguage{Manchu}{MCH}
-\newfontlanguage{Moose~Cree}{MCR}\newfontlanguage{Mende}{MDE}
-\newfontlanguage{Me'en}{MEN}\newfontlanguage{Mizo}{MIZ}
-\newfontlanguage{Macedonian}{MKD}\newfontlanguage{Male}{MLE}
-\newfontlanguage{Malagasy}{MLG}\newfontlanguage{Malinke}{MLN}
-\newfontlanguage{Malayalam~Reformed}{MLR}\newfontlanguage{Malay}{MLY}
-\newfontlanguage{Mandinka}{MND}\newfontlanguage{Mongolian}{MNG}
-\newfontlanguage{Manipuri}{MNI}\newfontlanguage{Maninka}{MNK}
-\newfontlanguage{Manx~Gaelic}{MNX}\newfontlanguage{Moksha}{MOK}
-\newfontlanguage{Moldavian}{MOL}\newfontlanguage{Mon}{MON}
-\newfontlanguage{Moroccan}{MOR}\newfontlanguage{Maori}{MRI}
-\newfontlanguage{Maithili}{MTH}\newfontlanguage{Maltese}{MTS}
-\newfontlanguage{Mundari}{MUN}\newfontlanguage{Naga-Assamese}{NAG}
-\newfontlanguage{Nanai}{NAN}\newfontlanguage{Naskapi}{NAS}
-\newfontlanguage{N-Cree}{NCR}\newfontlanguage{Ndebele}{NDB}
-\newfontlanguage{Ndonga}{NDG}\newfontlanguage{Nepali}{NEP}
-\newfontlanguage{Newari}{NEW}\newfontlanguage{Nagari}{NGR}
-\newfontlanguage{Norway~House~Cree}{NHC}\newfontlanguage{Nisi}{NIS}
-\newfontlanguage{Niuean}{NIU}\newfontlanguage{Nkole}{NKL}
-\newfontlanguage{N'ko}{NKO}\newfontlanguage{Dutch}{NLD}
-\newfontlanguage{Nogai}{NOG}\newfontlanguage{Norwegian}{NOR}
-\newfontlanguage{Northern~Sami}{NSM}\newfontlanguage{Northern~Tai}{NTA}
-\newfontlanguage{Esperanto}{NTO}\newfontlanguage{Nynorsk}{NYN}
-\newfontlanguage{Oji-Cree}{OCR}\newfontlanguage{Ojibway}{OJB}
-\newfontlanguage{Oriya}{ORI}\newfontlanguage{Oromo}{ORO}
-\newfontlanguage{Ossetian}{OSS}\newfontlanguage{Palestinian~Aramaic}{PAA}
-\newfontlanguage{Pali}{PAL}\newfontlanguage{Punjabi}{PAN}
-\newfontlanguage{Palpa}{PAP}\newfontlanguage{Pashto}{PAS}
-\newfontlanguage{Polytonic~Greek}{PGR}\newfontlanguage{Pilipino}{PIL}
-\newfontlanguage{Palaung}{PLG}\newfontlanguage{Polish}{PLK}
-\newfontlanguage{Provencal}{PRO}\newfontlanguage{Portuguese}{PTG}
-\newfontlanguage{Chin}{QIN}\newfontlanguage{Rajasthani}{RAJ}
-\newfontlanguage{R-Cree}{RCR}\newfontlanguage{Russian~Buriat}{RBU}
-\newfontlanguage{Riang}{RIA}\newfontlanguage{Rhaeto-Romanic}{RMS}
-\newfontlanguage{Romanian}{ROM}\newfontlanguage{Romany}{ROY}
-\newfontlanguage{Rusyn}{RSY}\newfontlanguage{Ruanda}{RUA}
-\newfontlanguage{Russian}{RUS}\newfontlanguage{Sadri}{SAD}
-\newfontlanguage{Sanskrit}{SAN}\newfontlanguage{Santali}{SAT}
-\newfontlanguage{Sayisi}{SAY}\newfontlanguage{Sekota}{SEK}
-\newfontlanguage{Selkup}{SEL}\newfontlanguage{Sango}{SGO}
-\newfontlanguage{Shan}{SHN}\newfontlanguage{Sibe}{SIB}
-\newfontlanguage{Sidamo}{SID}\newfontlanguage{Silte~Gurage}{SIG}
-\newfontlanguage{Skolt~Sami}{SKS}\newfontlanguage{Slovak}{SKY}
-\newfontlanguage{Slavey}{SLA}\newfontlanguage{Slovenian}{SLV}
-\newfontlanguage{Somali}{SML}\newfontlanguage{Samoan}{SMO}
-\newfontlanguage{Sena}{SNA}\newfontlanguage{Sindhi}{SND}
-\newfontlanguage{Sinhalese}{SNH}\newfontlanguage{Soninke}{SNK}
-\newfontlanguage{Sodo~Gurage}{SOG}\newfontlanguage{Sotho}{SOT}
-\newfontlanguage{Albanian}{SQI}\newfontlanguage{Serbian}{SRB}
-\newfontlanguage{Saraiki}{SRK}\newfontlanguage{Serer}{SRR}
-\newfontlanguage{South~Slavey}{SSL}\newfontlanguage{Southern~Sami}{SSM}
-\newfontlanguage{Suri}{SUR}\newfontlanguage{Svan}{SVA}
-\newfontlanguage{Swedish}{SVE}\newfontlanguage{Swadaya~Aramaic}{SWA}
-\newfontlanguage{Swahili}{SWK}\newfontlanguage{Swazi}{SWZ}
-\newfontlanguage{Sutu}{SXT}\newfontlanguage{Syriac}{SYR}
-\newfontlanguage{Tabasaran}{TAB}\newfontlanguage{Tajiki}{TAJ}
-\newfontlanguage{Tamil}{TAM}\newfontlanguage{Tatar}{TAT}
-\newfontlanguage{TH-Cree}{TCR}\newfontlanguage{Telugu}{TEL}
-\newfontlanguage{Tongan}{TGN}\newfontlanguage{Tigre}{TGR}
-\newfontlanguage{Tigrinya}{TGY}\newfontlanguage{Thai}{THA}
-\newfontlanguage{Tahitian}{THT}\newfontlanguage{Tibetan}{TIB}
-\newfontlanguage{Turkmen}{TKM}\newfontlanguage{Temne}{TMN}
-\newfontlanguage{Tswana}{TNA}\newfontlanguage{Tundra~Nenets}{TNE}
-\newfontlanguage{Tonga}{TNG}\newfontlanguage{Todo}{TOD}
-\newfontlanguage{Tsonga}{TSG}\newfontlanguage{Turoyo~Aramaic}{TUA}
-\newfontlanguage{Tulu}{TUL}\newfontlanguage{Tuvin}{TUV}
-\newfontlanguage{Twi}{TWI}\newfontlanguage{Udmurt}{UDM}
-\newfontlanguage{Ukrainian}{UKR}\newfontlanguage{Urdu}{URD}
-\newfontlanguage{Upper~Sorbian}{USB}\newfontlanguage{Uyghur}{UYG}
-\newfontlanguage{Uzbek}{UZB}\newfontlanguage{Venda}{VEN}
-\newfontlanguage{Vietnamese}{VIT}\newfontlanguage{Wa}{WA}
-\newfontlanguage{Wagdi}{WAG}\newfontlanguage{West-Cree}{WCR}
-\newfontlanguage{Welsh}{WEL}\newfontlanguage{Wolof}{WLF}
-\newfontlanguage{Tai~Lue}{XBD}\newfontlanguage{Xhosa}{XHS}
-\newfontlanguage{Yakut}{YAK}\newfontlanguage{Yoruba}{YBA}
-\newfontlanguage{Y-Cree}{YCR}\newfontlanguage{Yi~Classic}{YIC}
-\newfontlanguage{Yi~Modern}{YIM}\newfontlanguage{Chinese~Hong~Kong}{ZHH}
+\newfontlanguage{Finnish}{FIN}
+\newfontlanguage{Fijian}{FJI}
+\newfontlanguage{Flemish}{FLE}
+\newfontlanguage{Forest~Nenets}{FNE}
+\newfontlanguage{Fon}{FON}
+\newfontlanguage{Faroese}{FOS}
+\newfontlanguage{French}{FRA}
+\newfontlanguage{Frisian}{FRI}
+\newfontlanguage{Friulian}{FRL}
+\newfontlanguage{Futa}{FTA}
+\newfontlanguage{Fulani}{FUL}
+\newfontlanguage{Ga}{GAD}
+\newfontlanguage{Gaelic}{GAE}
+\newfontlanguage{Gagauz}{GAG}
+\newfontlanguage{Galician}{GAL}
+\newfontlanguage{Garshuni}{GAR}
+\newfontlanguage{Garhwali}{GAW}
+\newfontlanguage{Ge'ez}{GEZ}
+\newfontlanguage{Gilyak}{GIL}
+\newfontlanguage{Gumuz}{GMZ}
+\newfontlanguage{Gondi}{GON}
+\newfontlanguage{Greenlandic}{GRN}
+\newfontlanguage{Garo}{GRO}
+\newfontlanguage{Guarani}{GUA}
+\newfontlanguage{Gujarati}{GUJ}
+\newfontlanguage{Haitian}{HAI}
+\newfontlanguage{Halam}{HAL}
+\newfontlanguage{Harauti}{HAR}
+\newfontlanguage{Hausa}{HAU}
+\newfontlanguage{Hawaiin}{HAW}
+\newfontlanguage{Hammer-Banna}{HBN}
+\newfontlanguage{Hiligaynon}{HIL}
+\newfontlanguage{Hindi}{HIN}
+\newfontlanguage{High~Mari}{HMA}
+\newfontlanguage{Hindko}{HND}
+\newfontlanguage{Ho}{HO}
+\newfontlanguage{Harari}{HRI}
+\newfontlanguage{Croatian}{HRV}
+\newfontlanguage{Hungarian}{HUN}
+\newfontlanguage{Armenian}{HYE}
+\newfontlanguage{Igbo}{IBO}
+\newfontlanguage{Ijo}{IJO}
+\newfontlanguage{Ilokano}{ILO}
+\newfontlanguage{Indonesian}{IND}
+\newfontlanguage{Ingush}{ING}
+\newfontlanguage{Inuktitut}{INU}
+\newfontlanguage{Irish}{IRI}
+\newfontlanguage{Irish~Traditional}{IRT}
+\newfontlanguage{Icelandic}{ISL}
+\newfontlanguage{Inari~Sami}{ISM}
+\newfontlanguage{Italian}{ITA}
+\newfontlanguage{Hebrew}{IWR}
+\newfontlanguage{Javanese}{JAV}
+\newfontlanguage{Yiddish}{JII}
+\newfontlanguage{Japanese}{JAN}
+\newfontlanguage{Judezmo}{JUD}
+\newfontlanguage{Jula}{JUL}
+\newfontlanguage{Kabardian}{KAB}
+\newfontlanguage{Kachchi}{KAC}
+\newfontlanguage{Kalenjin}{KAL}
+\newfontlanguage{Kannada}{KAN}
+\newfontlanguage{Karachay}{KAR}
+\newfontlanguage{Georgian}{KAT}
+\newfontlanguage{Kazakh}{KAZ}
+\newfontlanguage{Kebena}{KEB}
+\newfontlanguage{Khutsuri~Georgian}{KGE}
+\newfontlanguage{Khakass}{KHA}
+\newfontlanguage{Khanty-Kazim}{KHK}
+\newfontlanguage{Khmer}{KHM}
+\newfontlanguage{Khanty-Shurishkar}{KHS}
+\newfontlanguage{Khanty-Vakhi}{KHV}
+\newfontlanguage{Khowar}{KHW}
+\newfontlanguage{Kikuyu}{KIK}
+\newfontlanguage{Kirghiz}{KIR}
+\newfontlanguage{Kisii}{KIS}
+\newfontlanguage{Kokni}{KKN}
+\newfontlanguage{Kalmyk}{KLM}
+\newfontlanguage{Kamba}{KMB}
+\newfontlanguage{Kumaoni}{KMN}
+\newfontlanguage{Komo}{KMO}
+\newfontlanguage{Komso}{KMS}
+\newfontlanguage{Kanuri}{KNR}
+\newfontlanguage{Kodagu}{KOD}
+\newfontlanguage{Korean~Old~Hangul}{KOH}
+\newfontlanguage{Konkani}{KOK}
+\newfontlanguage{Kikongo}{KON}
+\newfontlanguage{Komi-Permyak}{KOP}
+\newfontlanguage{Korean}{KOR}
+\newfontlanguage{Komi-Zyrian}{KOZ}
+\newfontlanguage{Kpelle}{KPL}
+\newfontlanguage{Krio}{KRI}
+\newfontlanguage{Karakalpak}{KRK}
+\newfontlanguage{Karelian}{KRL}
+\newfontlanguage{Karaim}{KRM}
+\newfontlanguage{Karen}{KRN}
+\newfontlanguage{Koorete}{KRT}
+\newfontlanguage{Kashmiri}{KSH}
+\newfontlanguage{Khasi}{KSI}
+\newfontlanguage{Kildin~Sami}{KSM}
+\newfontlanguage{Kui}{KUI}
+\newfontlanguage{Kulvi}{KUL}
+\newfontlanguage{Kumyk}{KUM}
+\newfontlanguage{Kurdish}{KUR}
+\newfontlanguage{Kurukh}{KUU}
+\newfontlanguage{Kuy}{KUY}
+\newfontlanguage{Koryak}{KYK}
+\newfontlanguage{Ladin}{LAD}
+\newfontlanguage{Lahuli}{LAH}
+\newfontlanguage{Lak}{LAK}
+\newfontlanguage{Lambani}{LAM}
+\newfontlanguage{Lao}{LAO}
+\newfontlanguage{Latin}{LAT}
+\newfontlanguage{Laz}{LAZ}
+\newfontlanguage{L-Cree}{LCR}
+\newfontlanguage{Ladakhi}{LDK}
+\newfontlanguage{Lezgi}{LEZ}
+\newfontlanguage{Lingala}{LIN}
+\newfontlanguage{Low~Mari}{LMA}
+\newfontlanguage{Limbu}{LMB}
+\newfontlanguage{Lomwe}{LMW}
+\newfontlanguage{Lower~Sorbian}{LSB}
+\newfontlanguage{Lule~Sami}{LSM}
+\newfontlanguage{Lithuanian}{LTH}
+\newfontlanguage{Luba}{LUB}
+\newfontlanguage{Luganda}{LUG}
+\newfontlanguage{Luhya}{LUH}
+\newfontlanguage{Luo}{LUO}
+\newfontlanguage{Latvian}{LVI}
+\newfontlanguage{Majang}{MAJ}
+\newfontlanguage{Makua}{MAK}
+\newfontlanguage{Malayalam~Traditional}{MAL}
+\newfontlanguage{Mansi}{MAN}
+\newfontlanguage{Marathi}{MAR}
+\newfontlanguage{Marwari}{MAW}
+\newfontlanguage{Mbundu}{MBN}
+\newfontlanguage{Manchu}{MCH}
+\newfontlanguage{Moose~Cree}{MCR}
+\newfontlanguage{Mende}{MDE}
+\newfontlanguage{Me'en}{MEN}
+\newfontlanguage{Mizo}{MIZ}
+\newfontlanguage{Macedonian}{MKD}
+\newfontlanguage{Male}{MLE}
+\newfontlanguage{Malagasy}{MLG}
+\newfontlanguage{Malinke}{MLN}
+\newfontlanguage{Malayalam~Reformed}{MLR}
+\newfontlanguage{Malay}{MLY}
+\newfontlanguage{Mandinka}{MND}
+\newfontlanguage{Mongolian}{MNG}
+\newfontlanguage{Manipuri}{MNI}
+\newfontlanguage{Maninka}{MNK}
+\newfontlanguage{Manx~Gaelic}{MNX}
+\newfontlanguage{Moksha}{MOK}
+\newfontlanguage{Moldavian}{MOL}
+\newfontlanguage{Mon}{MON}
+\newfontlanguage{Moroccan}{MOR}
+\newfontlanguage{Maori}{MRI}
+\newfontlanguage{Maithili}{MTH}
+\newfontlanguage{Maltese}{MTS}
+\newfontlanguage{Mundari}{MUN}
+\newfontlanguage{Naga-Assamese}{NAG}
+\newfontlanguage{Nanai}{NAN}
+\newfontlanguage{Naskapi}{NAS}
+\newfontlanguage{N-Cree}{NCR}
+\newfontlanguage{Ndebele}{NDB}
+\newfontlanguage{Ndonga}{NDG}
+\newfontlanguage{Nepali}{NEP}
+\newfontlanguage{Newari}{NEW}
+\newfontlanguage{Nagari}{NGR}
+\newfontlanguage{Norway~House~Cree}{NHC}
+\newfontlanguage{Nisi}{NIS}
+\newfontlanguage{Niuean}{NIU}
+\newfontlanguage{Nkole}{NKL}
+\newfontlanguage{N'ko}{NKO}
+\newfontlanguage{Dutch}{NLD}
+\newfontlanguage{Nogai}{NOG}
+\newfontlanguage{Norwegian}{NOR}
+\newfontlanguage{Northern~Sami}{NSM}
+\newfontlanguage{Northern~Tai}{NTA}
+\newfontlanguage{Esperanto}{NTO}
+\newfontlanguage{Nynorsk}{NYN}
+\newfontlanguage{Oji-Cree}{OCR}
+\newfontlanguage{Ojibway}{OJB}
+\newfontlanguage{Oriya}{ORI}
+\newfontlanguage{Oromo}{ORO}
+\newfontlanguage{Ossetian}{OSS}
+\newfontlanguage{Palestinian~Aramaic}{PAA}
+\newfontlanguage{Pali}{PAL}
+\newfontlanguage{Punjabi}{PAN}
+\newfontlanguage{Palpa}{PAP}
+\newfontlanguage{Pashto}{PAS}
+\newfontlanguage{Polytonic~Greek}{PGR}
+\newfontlanguage{Pilipino}{PIL}
+\newfontlanguage{Palaung}{PLG}
+\newfontlanguage{Polish}{PLK}
+\newfontlanguage{Provencal}{PRO}
+\newfontlanguage{Portuguese}{PTG}
+\newfontlanguage{Chin}{QIN}
+\newfontlanguage{Rajasthani}{RAJ}
+\newfontlanguage{R-Cree}{RCR}
+\newfontlanguage{Russian~Buriat}{RBU}
+\newfontlanguage{Riang}{RIA}
+\newfontlanguage{Rhaeto-Romanic}{RMS}
+\newfontlanguage{Romanian}{ROM}
+\newfontlanguage{Romany}{ROY}
+\newfontlanguage{Rusyn}{RSY}
+\newfontlanguage{Ruanda}{RUA}
+\newfontlanguage{Russian}{RUS}
+\newfontlanguage{Sadri}{SAD}
+\newfontlanguage{Sanskrit}{SAN}
+\newfontlanguage{Santali}{SAT}
+\newfontlanguage{Sayisi}{SAY}
+\newfontlanguage{Sekota}{SEK}
+\newfontlanguage{Selkup}{SEL}
+\newfontlanguage{Sango}{SGO}
+\newfontlanguage{Shan}{SHN}
+\newfontlanguage{Sibe}{SIB}
+\newfontlanguage{Sidamo}{SID}
+\newfontlanguage{Silte~Gurage}{SIG}
+\newfontlanguage{Skolt~Sami}{SKS}
+\newfontlanguage{Slovak}{SKY}
+\newfontlanguage{Slavey}{SLA}
+\newfontlanguage{Slovenian}{SLV}
+\newfontlanguage{Somali}{SML}
+\newfontlanguage{Samoan}{SMO}
+\newfontlanguage{Sena}{SNA}
+\newfontlanguage{Sindhi}{SND}
+\newfontlanguage{Sinhalese}{SNH}
+\newfontlanguage{Soninke}{SNK}
+\newfontlanguage{Sodo~Gurage}{SOG}
+\newfontlanguage{Sotho}{SOT}
+\newfontlanguage{Albanian}{SQI}
+\newfontlanguage{Serbian}{SRB}
+\newfontlanguage{Saraiki}{SRK}
+\newfontlanguage{Serer}{SRR}
+\newfontlanguage{South~Slavey}{SSL}
+\newfontlanguage{Southern~Sami}{SSM}
+\newfontlanguage{Suri}{SUR}
+\newfontlanguage{Svan}{SVA}
+\newfontlanguage{Swedish}{SVE}
+\newfontlanguage{Swadaya~Aramaic}{SWA}
+\newfontlanguage{Swahili}{SWK}
+\newfontlanguage{Swazi}{SWZ}
+\newfontlanguage{Sutu}{SXT}
+\newfontlanguage{Syriac}{SYR}
+\newfontlanguage{Tabasaran}{TAB}
+\newfontlanguage{Tajiki}{TAJ}
+\newfontlanguage{Tamil}{TAM}
+\newfontlanguage{Tatar}{TAT}
+\newfontlanguage{TH-Cree}{TCR}
+\newfontlanguage{Telugu}{TEL}
+\newfontlanguage{Tongan}{TGN}
+\newfontlanguage{Tigre}{TGR}
+\newfontlanguage{Tigrinya}{TGY}
+\newfontlanguage{Thai}{THA}
+\newfontlanguage{Tahitian}{THT}
+\newfontlanguage{Tibetan}{TIB}
+\newfontlanguage{Turkmen}{TKM}
+\newfontlanguage{Temne}{TMN}
+\newfontlanguage{Tswana}{TNA}
+\newfontlanguage{Tundra~Nenets}{TNE}
+\newfontlanguage{Tonga}{TNG}
+\newfontlanguage{Todo}{TOD}
+\newfontlanguage{Tsonga}{TSG}
+\newfontlanguage{Turoyo~Aramaic}{TUA}
+\newfontlanguage{Tulu}{TUL}
+\newfontlanguage{Tuvin}{TUV}
+\newfontlanguage{Twi}{TWI}
+\newfontlanguage{Udmurt}{UDM}
+\newfontlanguage{Ukrainian}{UKR}
+\newfontlanguage{Urdu}{URD}
+\newfontlanguage{Upper~Sorbian}{USB}
+\newfontlanguage{Uyghur}{UYG}
+\newfontlanguage{Uzbek}{UZB}
+\newfontlanguage{Venda}{VEN}
+\newfontlanguage{Vietnamese}{VIT}
+\newfontlanguage{Wa}{WA}
+\newfontlanguage{Wagdi}{WAG}
+\newfontlanguage{West-Cree}{WCR}
+\newfontlanguage{Welsh}{WEL}
+\newfontlanguage{Wolof}{WLF}
+\newfontlanguage{Tai~Lue}{XBD}
+\newfontlanguage{Xhosa}{XHS}
+\newfontlanguage{Yakut}{YAK}
+\newfontlanguage{Yoruba}{YBA}
+\newfontlanguage{Y-Cree}{YCR}
+\newfontlanguage{Yi~Classic}{YIC}
+\newfontlanguage{Yi~Modern}{YIM}
+\newfontlanguage{Chinese~Hong~Kong}{ZHH}
\newfontlanguage{Chinese~Phonetic}{ZHP}
\newfontlanguage{Chinese~Simplified}{ZHS}
-\newfontlanguage{Chinese~Traditional}{ZHT}\newfontlanguage{Zande}{ZND}
+\newfontlanguage{Chinese~Traditional}{ZHT}
+\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
-\keys_define:nn {fontspec}
+
+
+\__fontspec_define_aat_feature_group:n {Ligatures}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Required} {1} {0}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoRequired} {1} {1}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Common} {1} {2}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoCommon} {1} {3}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Rare} {1} {4}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoRare} {1} {5}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Discretionary} {1} {4}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoDiscretionary} {1} {5}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Logos} {1} {6}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoLogos} {1} {7}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Rebus} {1} {8}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoRebus} {1} {9}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Diphthong} {1} {10}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoDiphthong} {1} {11}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Squared} {1} {12}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoSquared} {1} {13}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {AbbrevSquared} {1} {14}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoAbbrevSquared} {1} {15}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {Icelandic} {1} {32}
+\__fontspec_define_aat_feature:nnnn {Ligatures} {NoIcelandic} {1} {33}
+\keys_define:nn {fontspec-aat}
{
- Language / Turkish .code:n =
+ Ligatures / TeX .code:n =
{
- \fontspec_check_lang:nTF {TRK}
- {
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TRK}
- }
- {
- \fontspec_check_lang:nTF {TUR}
- {
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TUR}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {Turkish}
- \keys_set:nn {fontspec} {Language=Default}
- }
- }
+ \__fontspec_update_featstr:n { mapping = tex-text }
}
}
-\__fontspec_keys_define_code:nnn {fontspec}{ Language / Default }
+\__fontspec_define_aat_feature_group:n {Letters}
+\__fontspec_define_aat_feature:nnnn {Letters} {Normal} {3} {0}
+\__fontspec_define_aat_feature:nnnn {Letters} {Uppercase} {3} {1}
+\__fontspec_define_aat_feature:nnnn {Letters} {Lowercase} {3} {2}
+\__fontspec_define_aat_feature:nnnn {Letters} {SmallCaps} {3} {3}
+\__fontspec_define_aat_feature:nnnn {Letters} {InitialCaps} {3} {4}
+\__fontspec_define_aat_feature_group:n {Numbers}
+\__fontspec_define_aat_feature:nnnn {Numbers} {Monospaced} {6} {0}
+\__fontspec_define_aat_feature:nnnn {Numbers} {Proportional} {6} {1}
+\__fontspec_define_aat_feature:nnnn {Numbers} {Lowercase} {21} {0}
+\__fontspec_define_aat_feature:nnnn {Numbers} {OldStyle} {21} {0}
+\__fontspec_define_aat_feature:nnnn {Numbers} {Uppercase} {21} {1}
+\__fontspec_define_aat_feature:nnnn {Numbers} {Lining} {21} {1}
+\__fontspec_define_aat_feature:nnnn {Numbers} {SlashedZero} {14} {5}
+\__fontspec_define_aat_feature:nnnn {Numbers} {NoSlashedZero} {14} {4}
+\__fontspec_define_aat_feature_group:n {Contextuals}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {WordInitial} {8} {0}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {NoWordInitial} {8} {1}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {WordFinal} {8} {2}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {NoWordFinal} {8} {3}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {LineInitial} {8} {4}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {NoLineInitial} {8} {5}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {LineFinal} {8} {6}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {NoLineFinal} {8} {7}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {Inner} {8} {8}
+\__fontspec_define_aat_feature:nnnn {Contextuals} {NoInner} {8} {9}
+\__fontspec_define_aat_feature_group:n {Diacritics}
+\__fontspec_define_aat_feature:nnnn {Diacritics} {Show} {9} {0}
+\__fontspec_define_aat_feature:nnnn {Diacritics} {Hide} {9} {1}
+\__fontspec_define_aat_feature:nnnn {Diacritics} {Decompose} {9} {2}
+\__fontspec_define_aat_feature_group:n {VerticalPosition}
+\__fontspec_define_aat_feature:nnnn {VerticalPosition} {Normal} {10} {0}
+\__fontspec_define_aat_feature:nnnn {VerticalPosition} {Superior} {10} {1}
+\__fontspec_define_aat_feature:nnnn {VerticalPosition} {Inferior} {10} {2}
+\__fontspec_define_aat_feature:nnnn {VerticalPosition} {Ordinal} {10} {3}
+\__fontspec_define_aat_feature_group:n {Fractions}
+\__fontspec_define_aat_feature:nnnn {Fractions} {On} {11} {1}
+\__fontspec_define_aat_feature:nnnn {Fractions} {Off} {11} {0}
+\__fontspec_define_aat_feature:nnnn {Fractions} {Diagonal} {11} {2}
+\__fontspec_define_aat_feature_group:n { Alternate }
+\keys_define:nn {fontspec-aat}
{
- \tl_set:Nn \l_fontspec_lang_tl {DFLT}
- \int_zero:N \l_fontspec_language_int
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \__fontspec_make_AAT_feature:nn {17}{##1}
+ }
+ }
}
-\__fontspec_keys_define_code:nnn {fontspec} {RawFeature}
+\__fontspec_define_aat_feature_group:n {Variant}
+\keys_define:nn {fontspec-aat}
{
- \__fontspec_update_featstr:n {#1}
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \__fontspec_make_AAT_feature:nn {18}{##1} }
+ }
+ }
+\aliasfontfeature{Variant}{StylisticSet}
+\__fontspec_define_aat_feature_group:n {Vertical}
+\keys_define:nn {fontspec-aat}
+ {
+ Vertical .choice: ,
+ Vertical / RotatedGlyphs .code:n =
+ {
+ \__fontspec_update_featstr:n {vertical}
+ }
}
+
+\__fontspec_define_aat_feature_group:n {Style}
+\__fontspec_define_aat_feature:nnnn {Style} {Italic} {32} {2}
+\__fontspec_define_aat_feature:nnnn {Style} {Ruby} {28} {2}
+\__fontspec_define_aat_feature:nnnn {Style} {Display} {19} {1}
+\__fontspec_define_aat_feature:nnnn {Style} {Engraved} {19} {2}
+\__fontspec_define_aat_feature:nnnn {Style} {TitlingCaps} {19} {4}
+\__fontspec_define_aat_feature:nnnn {Style} {TallCaps} {19} {5}
+\__fontspec_define_aat_feature_group:n {CJKShape}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {Traditional} {20} {0}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {Simplified} {20} {1}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {JIS1978} {20} {2}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {JIS1983} {20} {3}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {JIS1990} {20} {4}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {Expert} {20} {10}
+\__fontspec_define_aat_feature:nnnn {CJKShape} {NLC} {20} {13}
+\__fontspec_define_aat_feature_group:n {CharacterWidth}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Proportional} {22} {0}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Full} {22} {1}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Half} {22} {2}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Third} {22} {3}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Quarter} {22} {4}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {AlternateProportional} {22} {5}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {AlternateHalf} {22} {6}
+\__fontspec_define_aat_feature:nnnn {CharacterWidth} {Default} {22} {7}
+\__fontspec_define_aat_feature_group:n {Annotation}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Off} {24} {0}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Box} {24} {1}
+\__fontspec_define_aat_feature:nnnn {Annotation} {RoundedBox} {24} {2}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Circle} {24} {3}
+\__fontspec_define_aat_feature:nnnn {Annotation} {BlackCircle} {24} {4}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Parenthesis} {24} {5}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Period} {24} {6}
+\__fontspec_define_aat_feature:nnnn {Annotation} {RomanNumerals} {24} {7}
+\__fontspec_define_aat_feature:nnnn {Annotation} {Diamond} {24} {8}
+\__fontspec_define_aat_feature:nnnn {Annotation} {BlackSquare} {24} {9}
+\__fontspec_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
+\__fontspec_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
+
+\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
+\providecommand\UnicodeFontName[2]{"#1:#2"}
+\providecommand\UnicodeFontTeXLigatures{mapping=tex-text;}
+\providecommand\add@unicode@accent[2]{#2\char#1\relax}
+\providecommand\DeclareUnicodeAccent[3]{%
+ \DeclareTextCommand{#1}{#2}{\add@unicode@accent{#3}}%
+}
+\DeclareDocumentCommand \EncodingCommand {mO{}m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingCommand }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}[#2]{#3}
+ }
+\DeclareDocumentCommand \EncodingAccent {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingAccent }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}{\add@unicode@accent{#2}}
+ }
+\DeclareDocumentCommand \EncodingSymbol {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingSymbol }
+ \DeclareTextSymbol{#1}{\UnicodeEncodingName}{#2}
+ }
+\DeclareDocumentCommand \EncodingComposite {mmm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingComposite }
+ \DeclareTextComposite{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+\DeclareDocumentCommand \EncodingCompositeCommand {mmm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \EncodingCompositeCommand }
+ \DeclareTextCompositeCommand{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+\DeclareDocumentCommand \DeclareUnicodeEncoding {mm}
+ {
+ \DeclareFontEncoding{#1}{}{}
+ \DeclareErrorFont{#1}{lmr}{m}{n}{10}
+ \DeclareFontSubstitution{#1}{lmr}{m}{n}
+ \DeclareFontFamily{#1}{lmr}{}
+
+ \DeclareFontShape{#1}{lmr}{m}{n}
+ {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{it}
+ {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{sc}
+ {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{n}
+ {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{it}
+ {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+
+ \tl_set_eq:NN \l__fontspec_prev_unicode_name_tl \UnicodeEncodingName
+ \tl_set:Nn \UnicodeEncodingName {#1}
+ \bool_set_true:N \l__fontspec_defining_encoding_bool
+ #2
+ \bool_set_false:N \l__fontspec_defining_encoding_bool
+ \tl_set_eq:NN \UnicodeEncodingName \l__fontspec_prev_unicode_name_tl
+ }
+\DeclareDocumentCommand \UndeclareSymbol {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareSymbol }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+
+\DeclareDocumentCommand \UndeclareComposite {mm}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareComposite }
+ \cs_undefine:c
+ { \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
+ }
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -2661,7 +3487,7 @@
\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
\cs_set:Npn \zf@fontspec #1 #2
{
- \fontspec_select:nn {#1} {#2}
+ \__fontspec_select_font_family:nn {#1} {#2}
\tl_set:Nn \zf@family { \l_fontspec_family_tl }
\tl_set:Nn \zf@basefont { \l_fontspec_font }
}
@@ -2722,27 +3548,45 @@
\not@math@alphabet\upshape\relax
\fontspec_merge_shape:n\updefault
}
-\int_new:N \l__fontspec_em_int
-\int_new:N \l__fontspec_emdef_int
\cs_new_protected:Npn \emfontdeclare #1
{
- \int_zero:N \l__fontspec_emdef_int
- \clist_map_inline:nn {#1}
- {
- \int_incr:N \l__fontspec_emdef_int
- \cs_set:cpn {__fontspec_em_font_ \int_use:N \l__fontspec_emdef_int _switch:} {##1}
- }
+ \prop_clear:N \g__fontspec_em_prop
+ \int_zero:N \l__fontspec_emdef_int
+ \group_begin:
+ \normalfont
+ \clist_map_inline:nn {\emreset,#1}
+ {
+ ##1
+ \prop_gput:NxV \g__fontspec_em_prop { \f@series/\f@shape } { \l__fontspec_emdef_int }
+ \prop_gput:Nxn \g__fontspec_em_prop { switch-\int_use:N \l__fontspec_emdef_int } { ##1 }
+ \int_incr:N \l__fontspec_emdef_int
+ }
+ \group_end:
}
\DeclareRobustCommand \em
{
\@nomath\em
+
+ \prop_get:NxNT \g__fontspec_em_prop { \f@series/\f@shape } \l__fontspec_em_tmp_tl
+ { \int_set:Nn \l__fontspec_em_int { \l__fontspec_em_tmp_tl } }
+
\int_incr:N \l__fontspec_em_int
- \use:c {__fontspec_em_font_ \int_use:N \l__fontspec_em_int _switch:}
+
+ \prop_get:NxNTF \g__fontspec_em_prop { switch-\int_use:N \l__fontspec_em_int } \l__fontspec_em_switch_tl
+ { \l__fontspec_em_switch_tl }
+ {
+ \int_zero:N \l__fontspec_em_int
+ \emreset
+ }
+
}
\DeclareTextFontCommand{\emph}{\em}
+\cs_set:Npn \emreset { \upshape }
\cs_set:Npn \emshape { \itshape }
\cs_set:Npn \eminnershape { \upshape }
\emfontdeclare{ \emshape, \eminnershape }
+\cs_set:Npn \reset@font { \normalfont \int_zero:N \l__fontspec_em_int }
+\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l__fontspec_em_int {#1} }
\DeclareRobustCommand{\-}
{
\discretionary
@@ -2757,7 +3601,7 @@
\def\xlx@defaulthyphenchar{`\-}
\cs_new:Nn \fontspec_visible_space:
{
- \font_glyph_if_exist:NnTF \font {"2423}
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
{ \char"2423\scan_stop: }
{ \fontspec_visible_space_fallback: }
}
@@ -2844,15 +3688,15 @@
{ \addfontfeature{Numbers=Lining} #1 }
}
%% ------------------------------------------------
-%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
+%% Copyright 2004--2017 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
%% 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-example.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
%% ------------------------------------------------
%%
%% End of file `fontspec-xetex.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index 0d3b3c170ce..9ab8febf070 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -7,7 +7,7 @@
-- fontspec-lua.dtx (with options: `lua')
-- ------------------------------------------------
-- The FONTSPEC package for XeLaTeX/LuaLaTeX
--- (C) 2004--2016 Will Robertson and Khaled Hosny
+-- (C) 2004--2017 Will Robertson and Khaled Hosny
-- License information appended.
-- ------------------------------------------------
fontspec = fontspec or {}
@@ -26,8 +26,14 @@ local err, warn, info, log = luatexbase.provides_module(fontspec.module)
fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s) end)
fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s) end)
-local function tempswatrue() tex.sprint([[\FontspecSetCheckBoolTrue ]]) end
-local function tempswafalse() tex.sprint([[\FontspecSetCheckBoolFalse]]) end
+local latex
+if luatexbase.registernumber then
+ latex = luatexbase.registernumber("catcodetable@latex")
+else
+ latex = luatexbase.catcodetables.CatcodeTableLaTeX
+end
+local function tempswatrue() tex.sprint(latex,[[\FontspecSetCheckBoolTrue ]]) end
+local function tempswafalse() tex.sprint(latex,[[\FontspecSetCheckBoolFalse]]) end
function fontspec.check_ot_script(fnt, script)
if luaotfload.aux.provides_script(font.id(fnt), script) then
tempswatrue()
@@ -65,15 +71,15 @@ function fontspec.mathfontdimen(fnt, str)
end
end
-- ------------------------------------------------
--- Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
+-- Copyright 2004--2017 Will Robertson <wspr81@gmail.com>
-- Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
--
-- 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-example.tex.
--- And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+-- It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
+-- And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-- ------------------------------------------------
--
-- End of file `fontspec.lua'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index c50a7097202..18d22d63594 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -7,13 +7,13 @@
%% fontspec.dtx (with options: `fontspec,load')
%% ------------------------------------------------
%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% (C) 2004--2017 Will Robertson and Khaled Hosny
%% License information appended.
%% ------------------------------------------------
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/01/02}{2.5c}{Font selection for XeLaTeX and LuaLaTeX}
\sys_if_engine_luatex:T
{ \RequirePackage{luaotfload}
\directlua{require("fontspec")}
@@ -27,15 +27,15 @@
}
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
%% ------------------------------------------------
-%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
+%% Copyright 2004--2017 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
%% 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-example.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
%% ------------------------------------------------
%%
%% End of file `fontspec.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/tuenc.def b/Master/texmf-dist/tex/latex/fontspec/tuenc.def
index ab0fb8d987e..9800bd7e73e 100644
--- a/Master/texmf-dist/tex/latex/fontspec/tuenc.def
+++ b/Master/texmf-dist/tex/latex/fontspec/tuenc.def
@@ -1,90 +1,394 @@
+%%
+%% This is file `tuenc.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltoutenc.dtx (with options: `TU')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at http://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright 1993-2016
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, 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 2005/12/01 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%% From File: ltoutenc.dtx
\ProvidesFile{tuenc.def}
- [2016/01/29 v0.1 Unicode font encoding for LaTeX2e]
-
-%%%%%%
-% Please consider this encoding definition to be experimental!
-%%%%%%
-
+ [2016/12/11 v2.0a
+ Standard LaTeX file]
\providecommand\UnicodeEncodingName{TU}
-
-
-%% WRAPPERS NEEDED FOR FONT LOADING (.fd FILE COMMANDS)
-
\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname XeTeXrevision\endcsname\relax\else
- \def\UnicodeFontTeXLigatures{mapping=tex-text;}
-\fi
-
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname directlua\endcsname\relax\else
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname directlua\endcsname\relax
+ \PackageWarningNoLine{fontenc}
+ {\UnicodeEncodingName\space
+ encoding is only available with XeTeX and LuaTeX.\MessageBreak
+ Defaulting to T1 encoding}
+ \def\encodingdefault{T1}
+ \expandafter\expandafter\expandafter\endinput
+ \else
+ \def\UnicodeFontTeXLigatures{mapping=tex-text;}
+ \fi
+\else
\def\UnicodeFontTeXLigatures{+tlig;} % "+trep;" no longer needed
\fi
-
\def\UnicodeFontFile#1#2{"[#1]:#2"}
\def\UnicodeFontName#1#2{"#1:#2"}
-
-% Alternative luaotfload definitions for LuaLaTeX:
-% \def\UnicodeFontFile#1#2{"file:#1:#2"}
-% \def\UnicodeFontName#1#2{"name:#1:#2"}
-
-
-%% COMMANDS NEEDED TO DEFINE UNICODE COMMANDS AND ACCENTS
-
-% Accents in Unicode are postpended:
+\DeclareFontEncoding\UnicodeEncodingName{}{}
\def\add@unicode@accent#1#2{#2\char#1\relax}
-
-\def\DeclareUnicodeCommand#1#2{%
- \DeclareTextCommand{#1}{\LastDeclaredEncoding}{#2}%
-}
-
-\def\DeclareUnicodeAccent#1#2{%
- \DeclareTextCommand{#1}{\LastDeclaredEncoding}{\add@unicode@accent{#2}}%
-}
-
-\def\DeclareUnicodeSymbol#1#2{%
- \DeclareTextSymbol{#1}{\LastDeclaredEncoding}{#2}%
-}
-
-\def\DeclareUnicodeComposite#1#2#3{%
- \DeclareTextComposite{#1}{\LastDeclaredEncoding}{#2}{#3}%
-}
-
-\def\DeclareUnicodeCompositeCommand#1#2#3{%
- \DeclareTextCompositeCommand{#1}{\LastDeclaredEncoding}{#2}{#3}%
-}
-
-
-%% COMMANDS FOR DEFINING NEW ENCODINGS FROM FONT RANGES
-
-\def\NewUnicodeEncoding#1{%
- \DeclareFontEncoding{#1}{}{}
- \DeclareErrorFont{\LastDeclaredEncoding}{lmr}{m}{n}{10}
- \DeclareFontSubstitution{\LastDeclaredEncoding}{lmr}{m}{n}
- \DeclareFontFamily{\LastDeclaredEncoding}{lmr}{}
- \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{n}
- {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{it}
- {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{sc}
- {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{\LastDeclaredEncoding}{lmr}{bx}{n}
- {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{\LastDeclaredEncoding}{lmr}{bx}{it}
- {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
-}
-
-\def\DeclareUnicodeEncoding#1#2#3{%
- \NewUnicodeEncoding{#1}%
- \@for\@ii:=#2\do{%
- \InputIfFileExists{tufontrange-\@ii.def}{}{%
- \@latex@error{Unicode font range file `tufontrange-\@ii.def' not found}{\@ehd}%
- }%
- }%
- #3%
+\def\DeclareUnicodeAccent#1#2#3{%
+ \DeclareTextCommand{#1}{#2}{\add@unicode@accent{#3}}%
}
-
-%% THE ENCODING ITSELF
-
-\DeclareUnicodeEncoding{\UnicodeEncodingName}{T1,TS1}{}
-
+\DeclareTextSymbol{\textexclamdown} \UnicodeEncodingName{"00A1}
+\DeclareTextSymbol{\textcent} \UnicodeEncodingName{"00A2}
+\DeclareTextSymbol{\textsterling} \UnicodeEncodingName{"00A3}
+\DeclareTextSymbol{\textcurrency} \UnicodeEncodingName{"00A4}
+\DeclareTextSymbol{\textyen} \UnicodeEncodingName{"00A5}
+\DeclareTextSymbol{\textbrokenbar} \UnicodeEncodingName{"00A6}
+\DeclareTextSymbol{\textsection} \UnicodeEncodingName{"00A7}
+\DeclareTextSymbol{\textasciidieresis} \UnicodeEncodingName{"00A8}
+\DeclareTextSymbol{\textcopyright} \UnicodeEncodingName{"00A9}
+\DeclareTextSymbol{\textordfeminine} \UnicodeEncodingName{"00AA}
+\DeclareTextSymbol{\guillemotleft} \UnicodeEncodingName{"00AB}
+\DeclareTextSymbol{\textlnot} \UnicodeEncodingName{"00AC}
+\DeclareTextSymbol{\textregistered} \UnicodeEncodingName{"00AE}
+\DeclareTextSymbol{\textasciimacron} \UnicodeEncodingName{"00AF}
+\DeclareTextSymbol{\textdegree} \UnicodeEncodingName{"00B0}
+\DeclareTextSymbol{\textpm} \UnicodeEncodingName{"00B1}
+\DeclareTextSymbol{\texttwosuperior} \UnicodeEncodingName{"00B2}
+\DeclareTextSymbol{\textthreesuperior} \UnicodeEncodingName{"00B3}
+\DeclareTextSymbol{\textasciiacute} \UnicodeEncodingName{"00B4}
+\DeclareTextSymbol{\textmu} \UnicodeEncodingName{"00B5}
+\DeclareTextSymbol{\textparagraph} \UnicodeEncodingName{"00B6}
+\DeclareTextSymbol{\textperiodcentered} \UnicodeEncodingName{"00B7}
+\DeclareTextSymbol{\textonesuperior} \UnicodeEncodingName{"00B9}
+\DeclareTextSymbol{\textordmasculine} \UnicodeEncodingName{"00BA}
+\DeclareTextSymbol{\guillemotright} \UnicodeEncodingName{"00BB}
+\DeclareTextSymbol{\textonequarter} \UnicodeEncodingName{"00BC}
+\DeclareTextSymbol{\textonehalf} \UnicodeEncodingName{"00BD}
+\DeclareTextSymbol{\textthreequarters} \UnicodeEncodingName{"00BE}
+\DeclareTextSymbol{\textquestiondown} \UnicodeEncodingName{"00BF}
+\DeclareTextSymbol{\AE} \UnicodeEncodingName{"00C6}
+\DeclareTextSymbol{\DH} \UnicodeEncodingName{"00D0}
+\DeclareTextSymbol{\texttimes} \UnicodeEncodingName{"00D7}
+\DeclareTextSymbol{\O} \UnicodeEncodingName{"00D8}
+\DeclareTextSymbol{\TH} \UnicodeEncodingName{"00DE}
+\DeclareTextSymbol{\ss} \UnicodeEncodingName{"00DF}
+\DeclareTextSymbol{\ae} \UnicodeEncodingName{"00E6}
+\DeclareTextSymbol{\dh} \UnicodeEncodingName{"00F0}
+\DeclareTextSymbol{\textdiv} \UnicodeEncodingName{"00F7}
+\DeclareTextSymbol{\o} \UnicodeEncodingName{"00F8}
+\DeclareTextSymbol{\th} \UnicodeEncodingName{"00FE}
+\DeclareTextSymbol{\DJ} \UnicodeEncodingName{"0110}
+\DeclareTextSymbol{\dj} \UnicodeEncodingName{"0111}
+\DeclareTextSymbol{\i} \UnicodeEncodingName{"0131}
+\DeclareTextSymbol{\IJ} \UnicodeEncodingName{"0132}
+\DeclareTextSymbol{\ij} \UnicodeEncodingName{"0133}
+\DeclareTextSymbol{\L} \UnicodeEncodingName{"0141}
+\DeclareTextSymbol{\l} \UnicodeEncodingName{"0142}
+\DeclareTextSymbol{\NG} \UnicodeEncodingName{"014A}
+\DeclareTextSymbol{\ng} \UnicodeEncodingName{"014B}
+\DeclareTextSymbol{\OE} \UnicodeEncodingName{"0152}
+\DeclareTextSymbol{\oe} \UnicodeEncodingName{"0153}
+\DeclareTextSymbol{\textflorin} \UnicodeEncodingName{"0192}
+\DeclareTextSymbol{\j} \UnicodeEncodingName{"0237}
+\DeclareTextSymbol{\textasciicircum} \UnicodeEncodingName{"02C6}
+\DeclareTextSymbol{\textasciicaron} \UnicodeEncodingName{"02C7}
+\DeclareTextSymbol{\textasciitilde} \UnicodeEncodingName{"02DC}
+\DeclareTextSymbol{\textasciibreve} \UnicodeEncodingName{"02D8}
+\DeclareTextSymbol{\textacutedbl} \UnicodeEncodingName{"02DD}
+\DeclareTextSymbol{\textgravedbl} \UnicodeEncodingName{"02F5}
+\DeclareTextSymbol{\texttildelow} \UnicodeEncodingName{"02F7}
+\DeclareTextSymbol{\textbaht} \UnicodeEncodingName{"0E3F}
+\DeclareTextSymbol{\SS} \UnicodeEncodingName{"1E9E}
+\DeclareTextSymbol{\textcompwordmark} \UnicodeEncodingName{"200C}
+\DeclareTextSymbol{\textendash} \UnicodeEncodingName{"2013}
+\DeclareTextSymbol{\textemdash} \UnicodeEncodingName{"2014}
+\DeclareTextSymbol{\textbardbl} \UnicodeEncodingName{"2016}
+\DeclareTextSymbol{\textquoteleft} \UnicodeEncodingName{"2018}
+\DeclareTextSymbol{\textquoteright} \UnicodeEncodingName{"2019}
+\DeclareTextSymbol{\quotesinglbase} \UnicodeEncodingName{"201A}
+\DeclareTextSymbol{\textquotedblleft} \UnicodeEncodingName{"201C}
+\DeclareTextSymbol{\textquotedblright} \UnicodeEncodingName{"201D}
+\DeclareTextSymbol{\quotedblbase} \UnicodeEncodingName{"201E}
+\DeclareTextSymbol{\textdagger} \UnicodeEncodingName{"2020}
+\DeclareTextSymbol{\textdaggerdbl} \UnicodeEncodingName{"2021}
+\DeclareTextSymbol{\textbullet} \UnicodeEncodingName{"2022}
+\DeclareTextSymbol{\textellipsis} \UnicodeEncodingName{"2026}
+\DeclareTextSymbol{\textperthousand} \UnicodeEncodingName{"2030}
+\DeclareTextSymbol{\textpertenthousand} \UnicodeEncodingName{"2031}
+\DeclareTextSymbol{\guilsinglleft} \UnicodeEncodingName{"2039}
+\DeclareTextSymbol{\guilsinglright} \UnicodeEncodingName{"203A}
+\DeclareTextSymbol{\textreferencemark} \UnicodeEncodingName{"203B}
+\DeclareTextSymbol{\textinterrobang} \UnicodeEncodingName{"203D}
+\DeclareTextSymbol{\textfractionsolidus} \UnicodeEncodingName{"2044}
+\DeclareTextSymbol{\textlquill} \UnicodeEncodingName{"2045}
+\DeclareTextSymbol{\textrquill} \UnicodeEncodingName{"2046}
+\DeclareTextSymbol{\textasteriskcentered}\UnicodeEncodingName{"204E}
+\DeclareTextSymbol{\textdiscount} \UnicodeEncodingName{"2052}
+\DeclareTextSymbol{\textcolonmonetary} \UnicodeEncodingName{"20A1}
+\DeclareTextSymbol{\textlira} \UnicodeEncodingName{"20A4}
+\DeclareTextSymbol{\textnaira} \UnicodeEncodingName{"20A6}
+\DeclareTextSymbol{\textwon} \UnicodeEncodingName{"20A9}
+\DeclareTextSymbol{\textdong} \UnicodeEncodingName{"20AB}
+\DeclareTextSymbol{\texteuro} \UnicodeEncodingName{"20AC}
+\DeclareTextSymbol{\textpeso} \UnicodeEncodingName{"20B1}
+\DeclareTextSymbol{\textcelsius} \UnicodeEncodingName{"2103}
+\DeclareTextSymbol{\textnumero} \UnicodeEncodingName{"2116}
+\DeclareTextSymbol{\textcircledP} \UnicodeEncodingName{"2117}
+\DeclareTextSymbol{\textrecipe} \UnicodeEncodingName{"211E}
+\DeclareTextSymbol{\textservicemark} \UnicodeEncodingName{"2120}
+\DeclareTextSymbol{\texttrademark} \UnicodeEncodingName{"2122}
+\DeclareTextSymbol{\textohm} \UnicodeEncodingName{"2126}
+\DeclareTextSymbol{\textmho} \UnicodeEncodingName{"2127}
+\DeclareTextSymbol{\textestimated} \UnicodeEncodingName{"212E}
+\DeclareTextSymbol{\textleftarrow} \UnicodeEncodingName{"2190}
+\DeclareTextSymbol{\textuparrow} \UnicodeEncodingName{"2191}
+\DeclareTextSymbol{\textrightarrow} \UnicodeEncodingName{"2192}
+\DeclareTextSymbol{\textdownarrow} \UnicodeEncodingName{"2193}
+\DeclareTextSymbol{\textminus} \UnicodeEncodingName{"2212}
+\DeclareTextSymbol{\textsurd} \UnicodeEncodingName{"221A}
+\DeclareTextSymbol{\textlangle} \UnicodeEncodingName{"2329}
+\DeclareTextSymbol{\textrangle} \UnicodeEncodingName{"232A}
+\DeclareTextSymbol{\textblank} \UnicodeEncodingName{"2422}
+\DeclareTextSymbol{\textvisiblespace} \UnicodeEncodingName{"2423}
+\DeclareTextSymbol{\textopenbullet} \UnicodeEncodingName{"25E6}
+\DeclareTextSymbol{\textbigcircle} \UnicodeEncodingName{"25EF}
+\DeclareTextSymbol{\textmusicalnote} \UnicodeEncodingName{"266A}
+\DeclareTextSymbol{\textmarried} \UnicodeEncodingName{"26AD}
+\DeclareTextSymbol{\textdivorced} \UnicodeEncodingName{"26AE}
+\DeclareTextSymbol{\textinterrobangdown} \UnicodeEncodingName{"2E18}
+\DeclareUnicodeAccent{\`} \UnicodeEncodingName{"0300}
+\DeclareUnicodeAccent{\'} \UnicodeEncodingName{"0301}
+\DeclareUnicodeAccent{\^} \UnicodeEncodingName{"0302}
+\DeclareUnicodeAccent{\~} \UnicodeEncodingName{"0303}
+\DeclareUnicodeAccent{\"} \UnicodeEncodingName{"0308}
+\DeclareUnicodeAccent{\H} \UnicodeEncodingName{"030B}
+\DeclareUnicodeAccent{\r} \UnicodeEncodingName{"030A}
+\DeclareUnicodeAccent{\v} \UnicodeEncodingName{"030C}
+\DeclareUnicodeAccent{\u} \UnicodeEncodingName{"0306}
+\DeclareUnicodeAccent{\=} \UnicodeEncodingName{"0304}
+\DeclareUnicodeAccent{\.} \UnicodeEncodingName{"0307}
+\DeclareUnicodeAccent{\b} \UnicodeEncodingName{"0332}
+\DeclareUnicodeAccent{\c} \UnicodeEncodingName{"0327}
+\DeclareUnicodeAccent{\d} \UnicodeEncodingName{"0323}
+\DeclareUnicodeAccent{\k} \UnicodeEncodingName{"0328}
+\DeclareTextComposite{\`} \UnicodeEncodingName{A}{"00C0}
+\DeclareTextComposite{\'} \UnicodeEncodingName{A}{"00C1}
+\DeclareTextComposite{\^} \UnicodeEncodingName{A}{"00C2}
+\DeclareTextComposite{\~} \UnicodeEncodingName{A}{"00C3}
+\DeclareTextComposite{\"} \UnicodeEncodingName{A}{"00C4}
+\DeclareTextComposite{\r} \UnicodeEncodingName{A}{"00C5}
+\DeclareTextComposite{\c} \UnicodeEncodingName{C}{"00C7}
+\DeclareTextComposite{\`} \UnicodeEncodingName{E}{"00C8}
+\DeclareTextComposite{\'} \UnicodeEncodingName{E}{"00C9}
+\DeclareTextComposite{\^} \UnicodeEncodingName{E}{"00CA}
+\DeclareTextComposite{\"} \UnicodeEncodingName{E}{"00CB}
+\DeclareTextComposite{\`} \UnicodeEncodingName{I}{"00CC}
+\DeclareTextComposite{\'} \UnicodeEncodingName{I}{"00CD}
+\DeclareTextComposite{\^} \UnicodeEncodingName{I}{"00CE}
+\DeclareTextComposite{\"} \UnicodeEncodingName{I}{"00CF}
+\DeclareTextComposite{\~} \UnicodeEncodingName{N}{"00D1}
+\DeclareTextComposite{\`} \UnicodeEncodingName{O}{"00D2}
+\DeclareTextComposite{\'} \UnicodeEncodingName{O}{"00D3}
+\DeclareTextComposite{\^} \UnicodeEncodingName{O}{"00D4}
+\DeclareTextComposite{\~} \UnicodeEncodingName{O}{"00D5}
+\DeclareTextComposite{\"} \UnicodeEncodingName{O}{"00D6}
+\DeclareTextComposite{\`} \UnicodeEncodingName{U}{"00D9}
+\DeclareTextComposite{\'} \UnicodeEncodingName{U}{"00DA}
+\DeclareTextComposite{\^} \UnicodeEncodingName{U}{"00DB}
+\DeclareTextComposite{\"} \UnicodeEncodingName{U}{"00DC}
+\DeclareTextComposite{\'} \UnicodeEncodingName{Y}{"00DD}
+\DeclareTextComposite{\`} \UnicodeEncodingName{a}{"00E0}
+\DeclareTextComposite{\'} \UnicodeEncodingName{a}{"00E1}
+\DeclareTextComposite{\^} \UnicodeEncodingName{a}{"00E2}
+\DeclareTextComposite{\~} \UnicodeEncodingName{a}{"00E3}
+\DeclareTextComposite{\"} \UnicodeEncodingName{a}{"00E4}
+\DeclareTextComposite{\r} \UnicodeEncodingName{a}{"00E5}
+\DeclareTextComposite{\c} \UnicodeEncodingName{c}{"00E7}
+\DeclareTextComposite{\`} \UnicodeEncodingName{e}{"00E8}
+\DeclareTextComposite{\'} \UnicodeEncodingName{e}{"00E9}
+\DeclareTextComposite{\^} \UnicodeEncodingName{e}{"00EA}
+\DeclareTextComposite{\"} \UnicodeEncodingName{e}{"00EB}
+\DeclareTextComposite{\`} \UnicodeEncodingName\i {"00EC}
+\DeclareTextComposite{\'} \UnicodeEncodingName\i {"00ED}
+\DeclareTextComposite{\^} \UnicodeEncodingName\i {"00EE}
+\DeclareTextComposite{\"} \UnicodeEncodingName\i {"00EF}
+\DeclareTextComposite{\~} \UnicodeEncodingName{n}{"00F1}
+\DeclareTextComposite{\`} \UnicodeEncodingName{o}{"00F2}
+\DeclareTextComposite{\'} \UnicodeEncodingName{o}{"00F3}
+\DeclareTextComposite{\^} \UnicodeEncodingName{o}{"00F4}
+\DeclareTextComposite{\~} \UnicodeEncodingName{o}{"00F5}
+\DeclareTextComposite{\"} \UnicodeEncodingName{o}{"00F6}
+\DeclareTextComposite{\`} \UnicodeEncodingName{u}{"00F9}
+\DeclareTextComposite{\'} \UnicodeEncodingName{u}{"00FA}
+\DeclareTextComposite{\^} \UnicodeEncodingName{u}{"00FB}
+\DeclareTextComposite{\"} \UnicodeEncodingName{u}{"00FC}
+\DeclareTextComposite{\'} \UnicodeEncodingName{y}{"00FD}
+\DeclareTextComposite{\"} \UnicodeEncodingName{y}{"00FF}
+\DeclareTextComposite{\=} \UnicodeEncodingName{A}{"0100}
+\DeclareTextComposite{\=} \UnicodeEncodingName{a}{"0101}
+\DeclareTextComposite{\u} \UnicodeEncodingName{A}{"0102}
+\DeclareTextComposite{\u} \UnicodeEncodingName{a}{"0103}
+\DeclareTextComposite{\k} \UnicodeEncodingName{A}{"0104}
+\DeclareTextComposite{\k} \UnicodeEncodingName{a}{"0105}
+\DeclareTextComposite{\'} \UnicodeEncodingName{C}{"0106}
+\DeclareTextComposite{\'} \UnicodeEncodingName{c}{"0107}
+\DeclareTextComposite{\^} \UnicodeEncodingName{C}{"0108}
+\DeclareTextComposite{\^} \UnicodeEncodingName{c}{"0109}
+\DeclareTextComposite{\.} \UnicodeEncodingName{C}{"010A}
+\DeclareTextComposite{\.} \UnicodeEncodingName{c}{"010B}
+\DeclareTextComposite{\v} \UnicodeEncodingName{C}{"010C}
+\DeclareTextComposite{\v} \UnicodeEncodingName{c}{"010D}
+\DeclareTextComposite{\v} \UnicodeEncodingName{D}{"010E}
+\DeclareTextComposite{\v} \UnicodeEncodingName{d}{"010F}
+\DeclareTextComposite{\=} \UnicodeEncodingName{E}{"0112}
+\DeclareTextComposite{\=} \UnicodeEncodingName{e}{"0113}
+\DeclareTextComposite{\u} \UnicodeEncodingName{E}{"0114}
+\DeclareTextComposite{\u} \UnicodeEncodingName{e}{"0115}
+\DeclareTextComposite{\.} \UnicodeEncodingName{E}{"0116}
+\DeclareTextComposite{\.} \UnicodeEncodingName{e}{"0117}
+\DeclareTextComposite{\k} \UnicodeEncodingName{E}{"0118}
+\DeclareTextComposite{\k} \UnicodeEncodingName{e}{"0119}
+\DeclareTextComposite{\v} \UnicodeEncodingName{E}{"011A}
+\DeclareTextComposite{\v} \UnicodeEncodingName{e}{"011B}
+\DeclareTextComposite{\^} \UnicodeEncodingName{G}{"011C}
+\DeclareTextComposite{\^} \UnicodeEncodingName{g}{"011D}
+\DeclareTextComposite{\u} \UnicodeEncodingName{G}{"011E}
+\DeclareTextComposite{\u} \UnicodeEncodingName{g}{"011F}
+\DeclareTextComposite{\.} \UnicodeEncodingName{G}{"0120}
+\DeclareTextComposite{\.} \UnicodeEncodingName{g}{"0121}
+\DeclareTextComposite{\c} \UnicodeEncodingName{G}{"0122}
+\DeclareTextComposite{\c} \UnicodeEncodingName{g}{"0123}
+\DeclareTextComposite{\^} \UnicodeEncodingName{H}{"0124}
+\DeclareTextComposite{\^} \UnicodeEncodingName{h}{"0125}
+\DeclareTextComposite{\~} \UnicodeEncodingName{I}{"0128}
+\DeclareTextComposite{\~} \UnicodeEncodingName\i {"0129}
+\DeclareTextComposite{\=} \UnicodeEncodingName{I}{"012A}
+\DeclareTextComposite{\=} \UnicodeEncodingName\i {"012B}
+\DeclareTextComposite{\u} \UnicodeEncodingName{I}{"012C}
+\DeclareTextComposite{\u} \UnicodeEncodingName\i {"012D}
+\DeclareTextComposite{\k} \UnicodeEncodingName{I}{"012E}
+\DeclareTextComposite{\k} \UnicodeEncodingName\i {"012F}
+\DeclareTextComposite{\.} \UnicodeEncodingName{I}{"0130}
+\DeclareTextComposite{\^} \UnicodeEncodingName{J}{"0134}
+\DeclareTextComposite{\^} \UnicodeEncodingName\j {"0135}
+\DeclareTextComposite{\c} \UnicodeEncodingName{K}{"0136}
+\DeclareTextComposite{\c} \UnicodeEncodingName{k}{"0137}
+\DeclareTextComposite{\'} \UnicodeEncodingName{L}{"0139}
+\DeclareTextComposite{\'} \UnicodeEncodingName{l}{"013A}
+\DeclareTextComposite{\c} \UnicodeEncodingName{L}{"013B}
+\DeclareTextComposite{\c} \UnicodeEncodingName{l}{"013C}
+\DeclareTextComposite{\v} \UnicodeEncodingName{L}{"013D}
+\DeclareTextComposite{\v} \UnicodeEncodingName{l}{"013E}
+\DeclareTextComposite{\'} \UnicodeEncodingName{N}{"0143}
+\DeclareTextComposite{\'} \UnicodeEncodingName{n}{"0144}
+\DeclareTextComposite{\c} \UnicodeEncodingName{N}{"0145}
+\DeclareTextComposite{\c} \UnicodeEncodingName{n}{"0146}
+\DeclareTextComposite{\v} \UnicodeEncodingName{N}{"0147}
+\DeclareTextComposite{\v} \UnicodeEncodingName{n}{"0148}
+\DeclareTextComposite{\=} \UnicodeEncodingName{O}{"014C}
+\DeclareTextComposite{\=} \UnicodeEncodingName{o}{"014D}
+\DeclareTextComposite{\u} \UnicodeEncodingName{O}{"014E}
+\DeclareTextComposite{\u} \UnicodeEncodingName{o}{"014F}
+\DeclareTextComposite{\H} \UnicodeEncodingName{O}{"0150}
+\DeclareTextComposite{\H} \UnicodeEncodingName{o}{"0151}
+\DeclareTextComposite{\'} \UnicodeEncodingName{R}{"0154}
+\DeclareTextComposite{\'} \UnicodeEncodingName{r}{"0155}
+\DeclareTextComposite{\c} \UnicodeEncodingName{R}{"0156}
+\DeclareTextComposite{\c} \UnicodeEncodingName{r}{"0157}
+\DeclareTextComposite{\v} \UnicodeEncodingName{R}{"0158}
+\DeclareTextComposite{\v} \UnicodeEncodingName{r}{"0159}
+\DeclareTextComposite{\'} \UnicodeEncodingName{S}{"015A}
+\DeclareTextComposite{\'} \UnicodeEncodingName{s}{"015B}
+\DeclareTextComposite{\^} \UnicodeEncodingName{S}{"015C}
+\DeclareTextComposite{\^} \UnicodeEncodingName{s}{"015D}
+\DeclareTextComposite{\c} \UnicodeEncodingName{S}{"015E}
+\DeclareTextComposite{\c} \UnicodeEncodingName{s}{"015F}
+\DeclareTextComposite{\v} \UnicodeEncodingName{S}{"0160}
+\DeclareTextComposite{\v} \UnicodeEncodingName{s}{"0161}
+\DeclareTextComposite{\c} \UnicodeEncodingName{T}{"0162}
+\DeclareTextComposite{\c} \UnicodeEncodingName{t}{"0163}
+\DeclareTextComposite{\v} \UnicodeEncodingName{T}{"0164}
+\DeclareTextComposite{\v} \UnicodeEncodingName{t}{"0165}
+\DeclareTextComposite{\~} \UnicodeEncodingName{U}{"0168}
+\DeclareTextComposite{\~} \UnicodeEncodingName{u}{"0169}
+\DeclareTextComposite{\=} \UnicodeEncodingName{U}{"016A}
+\DeclareTextComposite{\=} \UnicodeEncodingName{u}{"016B}
+\DeclareTextComposite{\u} \UnicodeEncodingName{U}{"016C}
+\DeclareTextComposite{\u} \UnicodeEncodingName{u}{"016D}
+\DeclareTextComposite{\r} \UnicodeEncodingName{U}{"016E}
+\DeclareTextComposite{\r} \UnicodeEncodingName{u}{"016F}
+\DeclareTextComposite{\H} \UnicodeEncodingName{U}{"0170}
+\DeclareTextComposite{\H} \UnicodeEncodingName{u}{"0171}
+\DeclareTextComposite{\k} \UnicodeEncodingName{U}{"0172}
+\DeclareTextComposite{\k} \UnicodeEncodingName{u}{"0173}
+\DeclareTextComposite{\^} \UnicodeEncodingName{W}{"0174}
+\DeclareTextComposite{\^} \UnicodeEncodingName{w}{"0175}
+\DeclareTextComposite{\^} \UnicodeEncodingName{Y}{"0176}
+\DeclareTextComposite{\^} \UnicodeEncodingName{y}{"0177}
+\DeclareTextComposite{\"} \UnicodeEncodingName{Y}{"0178}
+\DeclareTextComposite{\'} \UnicodeEncodingName{Z}{"0179}
+\DeclareTextComposite{\'} \UnicodeEncodingName{z}{"017A}
+\DeclareTextComposite{\.} \UnicodeEncodingName{Z}{"017B}
+\DeclareTextComposite{\.} \UnicodeEncodingName{z}{"017C}
+\DeclareTextComposite{\v} \UnicodeEncodingName{Z}{"017D}
+\DeclareTextComposite{\v} \UnicodeEncodingName{z}{"017E}
+\DeclareTextComposite{\v} \UnicodeEncodingName{A}{"01CD}
+\DeclareTextComposite{\v} \UnicodeEncodingName{a}{"01CE}
+\DeclareTextComposite{\v} \UnicodeEncodingName{I}{"01CF}
+\DeclareTextComposite{\v} \UnicodeEncodingName\i {"01D0}
+\DeclareTextComposite{\v} \UnicodeEncodingName{O}{"01D1}
+\DeclareTextComposite{\v} \UnicodeEncodingName{o}{"01D2}
+\DeclareTextComposite{\v} \UnicodeEncodingName{U}{"01D3}
+\DeclareTextComposite{\v} \UnicodeEncodingName{u}{"01D4}
+\DeclareTextComposite{\=} \UnicodeEncodingName\AE{"01E2}
+\DeclareTextComposite{\=} \UnicodeEncodingName\ae{"01E3}
+\DeclareTextComposite{\v} \UnicodeEncodingName{G}{"01E6}
+\DeclareTextComposite{\v} \UnicodeEncodingName{g}{"01E7}
+\DeclareTextComposite{\v} \UnicodeEncodingName{K}{"01E8}
+\DeclareTextComposite{\v} \UnicodeEncodingName{k}{"01E9}
+\DeclareTextComposite{\k} \UnicodeEncodingName{O}{"01EA}
+\DeclareTextComposite{\k} \UnicodeEncodingName{o}{"01EB}
+\DeclareTextComposite{\v} \UnicodeEncodingName\j {"01F0}
+\DeclareTextComposite{\'} \UnicodeEncodingName{G}{"01F4}
+\DeclareTextComposite{\'} \UnicodeEncodingName{g}{"01F5}
+\DeclareTextComposite{\textcommabelow}\UnicodeEncodingName{S}{"0218}
+\DeclareTextComposite{\textcommabelow}\UnicodeEncodingName{s}{"0219}
+\DeclareTextComposite{\textcommabelow}\UnicodeEncodingName{T}{"021A}
+\DeclareTextComposite{\textcommabelow}\UnicodeEncodingName{t}{"021B}
+\DeclareTextComposite{\.} \UnicodeEncodingName{B}{"1E02}
+\DeclareTextComposite{\.} \UnicodeEncodingName{b}{"1E03}
\endinput
+%%
+%% End of file `tuenc.def'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def b/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def
deleted file mode 100644
index 27d9b14eb7f..00000000000
--- a/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def
+++ /dev/null
@@ -1,198 +0,0 @@
-\ProvidesFile{ucfontrange-T1.def}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% T1 SYMBOLS
-
-\DeclareUnicodeAccent{\`}{"0300}
-\DeclareUnicodeAccent{\'}{"0301}
-\DeclareUnicodeAccent{\^}{"0302}
-\DeclareUnicodeAccent{\~}{"0303}
-\DeclareUnicodeAccent{\"}{"0308}
-\DeclareUnicodeAccent{\H}{"030B}
-\DeclareUnicodeAccent{\r}{"030A}
-\DeclareUnicodeAccent{\v}{"030C}
-\DeclareUnicodeAccent{\u}{"0306}
-\DeclareUnicodeAccent{\=}{"0304}
-\DeclareUnicodeAccent{\.}{"0307}
-\DeclareUnicodeAccent{\b}{"0332}
-\DeclareUnicodeAccent{\c}{"0327}
-\DeclareUnicodeAccent{\d}{"0323}
-\DeclareUnicodeAccent{\k}{"0328}
-%% \textogonekcentered %% not in unicode?
-\DeclareUnicodeSymbol{\textperthousand}{"2030}
-\DeclareUnicodeSymbol{\textpertenthousand}{"2031}
-\DeclareUnicodeSymbol{\AE}{"00C6}
-\DeclareUnicodeSymbol{\DH}{"00D0}
-\DeclareUnicodeSymbol{\DJ}{"0110}
-\DeclareUnicodeSymbol{\L} {"0141}
-\DeclareUnicodeSymbol{\NG}{"014A}
-\DeclareUnicodeSymbol{\OE}{"0152}
-\DeclareUnicodeSymbol{\O} {"00D8}
-\DeclareUnicodeSymbol{\SS}{"1E9E}
-\DeclareUnicodeSymbol{\TH}{"00DE}
-\DeclareUnicodeSymbol{\ae}{"00E6}
-\DeclareUnicodeSymbol{\dh}{"00F0}
-\DeclareUnicodeSymbol{\dj}{"0111}
-\DeclareUnicodeSymbol{\guillemotleft}{"00AB}
-\DeclareUnicodeSymbol{\guillemotright}{"00BB}
-\DeclareUnicodeSymbol{\guilsinglleft}{"2039}
-\DeclareUnicodeSymbol{\guilsinglright}{"203A}
-\DeclareUnicodeSymbol{\i} {"0131}
-\DeclareUnicodeSymbol{\j} {"0237}
-\DeclareUnicodeSymbol{\ij}{"0133}
-\DeclareUnicodeSymbol{\IJ}{"0132}
-\DeclareUnicodeSymbol{\l} {"0142}
-\DeclareUnicodeSymbol{\ng}{"014B}
-\DeclareUnicodeSymbol{\oe}{"0153}
-\DeclareUnicodeSymbol{\o} {"00F8}
-\DeclareUnicodeSymbol{\quotedblbase}{"201E}
-\DeclareUnicodeSymbol{\quotesinglbase}{"201A}
-\DeclareUnicodeSymbol{\ss}{"00DF}
-\DeclareUnicodeSymbol{\textasciicircum}{`\^}
-\DeclareUnicodeSymbol{\textasciitilde}{`\~}
-\DeclareUnicodeSymbol{\textbackslash}{`\\}
-\DeclareUnicodeSymbol{\textbar}{`\|}
-\DeclareUnicodeSymbol{\textbraceleft}{`\{}
-\DeclareUnicodeSymbol{\textbraceright}{`\}}
-\DeclareUnicodeSymbol{\textcompwordmark}{"200C}
-\DeclareUnicodeSymbol{\textdollar}{`\$}
-\DeclareUnicodeSymbol{\textemdash}{"2014}
-\DeclareUnicodeSymbol{\textendash}{"2013}
-\DeclareUnicodeSymbol{\textexclamdown}{"00A1}
-\DeclareUnicodeSymbol{\textgreater}{`\>}
-\DeclareUnicodeSymbol{\textless}{`\<}
-\DeclareUnicodeSymbol{\textquestiondown}{"00BF}
-\DeclareUnicodeSymbol{\textquotedblleft}{"201C}
-\DeclareUnicodeSymbol{\textquotedblright}{"201D}
-\DeclareUnicodeSymbol{\textquotedbl}{`\"}
-\DeclareUnicodeSymbol{\textquoteleft}{"2018}
-\DeclareUnicodeSymbol{\textquoteright}{"2019}
-\DeclareUnicodeSymbol{\textsection}{"00A7}
-\DeclareUnicodeSymbol{\textsterling}{"00A3}
-\DeclareUnicodeSymbol{\textunderscore}{`\_}
-\DeclareUnicodeSymbol{\textvisiblespace}{"2423}
-\DeclareUnicodeSymbol{\th}{"00FE}
-\DeclareUnicodeComposite{\.}{i}{`\i}
-\DeclareUnicodeComposite{\.}{\i}{`\i}
-\DeclareUnicodeComposite{\u}{A}{"0102}
-\DeclareUnicodeComposite{\k}{A}{"0104}
-\DeclareUnicodeComposite{\'}{C}{"0106}
-\DeclareUnicodeComposite{\v}{C}{"010C}
-\DeclareUnicodeComposite{\v}{D}{"010E}
-\DeclareUnicodeComposite{\v}{E}{"011A}
-\DeclareUnicodeComposite{\k}{E}{"0118}
-\DeclareUnicodeComposite{\u}{G}{"011E}
-\DeclareUnicodeComposite{\'}{L}{"0139}
-\DeclareUnicodeComposite{\v}{L}{"013D}
-\DeclareUnicodeComposite{\'}{N}{"0143}
-\DeclareUnicodeComposite{\v}{N}{"0147}
-\DeclareUnicodeComposite{\H}{O}{"0150}
-\DeclareUnicodeComposite{\'}{R}{"0154}
-\DeclareUnicodeComposite{\v}{R}{"0158}
-\DeclareUnicodeComposite{\'}{S}{"015A}
-\DeclareUnicodeComposite{\v}{S}{"0160}
-\DeclareUnicodeComposite{\c}{S}{"015F}
-\DeclareUnicodeComposite{\v}{T}{"0164}
-\DeclareUnicodeComposite{\c}{T}{"0162}
-\DeclareUnicodeComposite{\H}{U}{"0170}
-\DeclareUnicodeComposite{\r}{U}{"016E}
-\DeclareUnicodeComposite{\"}{Y}{"0178}
-\DeclareUnicodeComposite{\'}{Z}{"017A}
-\DeclareUnicodeComposite{\v}{Z}{"017D}
-\DeclareUnicodeComposite{\.}{Z}{"017B}
-\DeclareUnicodeComposite{\.}{I}{"0130}
-\DeclareUnicodeComposite{\u}{a}{"0103}
-\DeclareUnicodeComposite{\k}{a}{"0105}
-\DeclareUnicodeComposite{\'}{c}{"0107}
-\DeclareUnicodeComposite{\v}{c}{"010D}
-\DeclareUnicodeComposite{\v}{d}{"010F}
-\DeclareUnicodeComposite{\v}{e}{"011B}
-\DeclareUnicodeComposite{\k}{e}{"0119}
-\DeclareUnicodeComposite{\u}{g}{"011F}
-\DeclareUnicodeComposite{\'}{l}{"0139}
-\DeclareUnicodeComposite{\v}{l}{"013E}
-\DeclareUnicodeComposite{\'}{n}{"0144}
-\DeclareUnicodeComposite{\v}{n}{"0148}
-\DeclareUnicodeComposite{\H}{o}{"0151}
-\DeclareUnicodeComposite{\'}{r}{"0155}
-\DeclareUnicodeComposite{\v}{r}{"0159}
-\DeclareUnicodeComposite{\'}{s}{"015B}
-\DeclareUnicodeComposite{\v}{s}{"0161}
-\DeclareUnicodeComposite{\c}{s}{"015F}
-\DeclareUnicodeComposite{\v}{t}{"0165}
-\DeclareUnicodeComposite{\c}{t}{"0163}
-\DeclareUnicodeComposite{\H}{u}{"0171}
-\DeclareUnicodeComposite{\r}{u}{"016F}
-\DeclareUnicodeComposite{\"}{y}{"00FF}
-\DeclareUnicodeComposite{\'}{z}{"00FD}
-\DeclareUnicodeComposite{\v}{z}{"017E}
-\DeclareUnicodeComposite{\.}{z}{"017C}
-\DeclareUnicodeComposite{\`}{A}{"00C0}
-\DeclareUnicodeComposite{\'}{A}{"00C1}
-\DeclareUnicodeComposite{\^}{A}{"00C2}
-\DeclareUnicodeComposite{\~}{A}{"00C3}
-\DeclareUnicodeComposite{\"}{A}{"00C4}
-\DeclareUnicodeComposite{\r}{A}{"00C5}
-\DeclareUnicodeComposite{\c}{C}{"00C7}
-\DeclareUnicodeComposite{\`}{E}{"00C8}
-\DeclareUnicodeComposite{\'}{E}{"00C9}
-\DeclareUnicodeComposite{\^}{E}{"00CA}
-\DeclareUnicodeComposite{\"}{E}{"00CB}
-\DeclareUnicodeComposite{\`}{I}{"00CC}
-\DeclareUnicodeComposite{\'}{I}{"00CD}
-\DeclareUnicodeComposite{\^}{I}{"00CE}
-\DeclareUnicodeComposite{\"}{I}{"00CF}
-\DeclareUnicodeComposite{\~}{N}{"00D1}
-\DeclareUnicodeComposite{\`}{O}{"00D2}
-\DeclareUnicodeComposite{\'}{O}{"00D3}
-\DeclareUnicodeComposite{\^}{O}{"00D4}
-\DeclareUnicodeComposite{\~}{O}{"00D5}
-\DeclareUnicodeComposite{\"}{O}{"00D6}
-\DeclareUnicodeComposite{\`}{U}{"00D9}
-\DeclareUnicodeComposite{\'}{U}{"00DA}
-\DeclareUnicodeComposite{\^}{U}{"00DB}
-\DeclareUnicodeComposite{\"}{U}{"00DC}
-\DeclareUnicodeComposite{\'}{Y}{"00DD}
-\DeclareUnicodeComposite{\`}{a}{"00E0}
-\DeclareUnicodeComposite{\'}{a}{"00E1}
-\DeclareUnicodeComposite{\^}{a}{"00E2}
-\DeclareUnicodeComposite{\~}{a}{"00E3}
-\DeclareUnicodeComposite{\"}{a}{"00E4}
-\DeclareUnicodeComposite{\r}{a}{"00E5}
-\DeclareUnicodeComposite{\c}{c}{"00E7}
-\DeclareUnicodeComposite{\`}{e}{"00E8}
-\DeclareUnicodeComposite{\'}{e}{"00E9}
-\DeclareUnicodeComposite{\^}{e}{"00EA}
-\DeclareUnicodeComposite{\"}{e}{"00EB}
-\DeclareUnicodeComposite{\`}{i} {"00EC}
-\DeclareUnicodeComposite{\`}{\i}{"00EC}
-\DeclareUnicodeComposite{\'}{i} {"00ED}
-\DeclareUnicodeComposite{\'}{\i}{"00ED}
-\DeclareUnicodeComposite{\^}{i} {"00EE}
-\DeclareUnicodeComposite{\^}{\i}{"00EE}
-\DeclareUnicodeComposite{\"}{i} {"00EF}
-\DeclareUnicodeComposite{\"}{\i}{"00EF}
-\DeclareUnicodeComposite{\~}{n}{"00F1}
-\DeclareUnicodeComposite{\`}{o}{"00F2}
-\DeclareUnicodeComposite{\'}{o}{"00F3}
-\DeclareUnicodeComposite{\^}{o}{"00F4}
-\DeclareUnicodeComposite{\~}{o}{"00F5}
-\DeclareUnicodeComposite{\"}{o}{"00F6}
-\DeclareUnicodeComposite{\`}{u}{"00F9}
-\DeclareUnicodeComposite{\'}{u}{"00FA}
-\DeclareUnicodeComposite{\^}{u}{"00FB}
-\DeclareUnicodeComposite{\"}{u}{"00FC}
-\DeclareUnicodeComposite{\'}{y}{"00FD}
-\DeclareUnicodeComposite{\k}{o}{"01EB}
-\DeclareUnicodeComposite{\k}{O}{"01EA}
-
-\DeclareUnicodeComposite{\c}{G}{"0122}
-\DeclareUnicodeComposite{\c}{g}{"0123} % note this cedilla is above not below :)
-\DeclareUnicodeComposite{\c}{K}{"0136}
-\DeclareUnicodeComposite{\c}{k}{"0137}
-\DeclareUnicodeComposite{\c}{L}{"013B}
-\DeclareUnicodeComposite{\c}{l}{"013C}
-\DeclareUnicodeComposite{\c}{N}{"0145}
-\DeclareUnicodeComposite{\c}{n}{"0146}
-\DeclareUnicodeComposite{\c}{R}{"0156}
-\DeclareUnicodeComposite{\c}{r}{"0157}
diff --git a/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def b/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def
deleted file mode 100644
index 4f6fdec4141..00000000000
--- a/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def
+++ /dev/null
@@ -1,134 +0,0 @@
-\ProvidesFile{ucfontrange-TS1.def}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% TS1 symbols
-
-\DeclareUnicodeAccent{\capitalcedilla}{"0327}
-\DeclareUnicodeAccent{\capitalogonek}{"0328}
-\DeclareUnicodeAccent{\capitalgrave}{"0300}
-\DeclareUnicodeAccent{\capitalacute}{"0301}
-\DeclareUnicodeAccent{\capitalcircumflex}{"0302}
-\DeclareUnicodeAccent{\capitaltilde}{"0303}
-\DeclareUnicodeAccent{\capitaldieresis}{"0308}
-\DeclareUnicodeAccent{\capitalhungarumlaut}{"030B}
-\DeclareUnicodeAccent{\capitalring}{"030A}
-\DeclareUnicodeAccent{\capitalcaron}{"030C}
-\DeclareUnicodeAccent{\capitalbreve}{"0306}
-\DeclareUnicodeAccent{\capitalmacron}{"0304}
-\DeclareUnicodeAccent{\capitaldotaccent}{"0307}
-\DeclareUnicodeAccent{\t}{"0361}
-\DeclareUnicodeAccent{\capitaltie}{"0361}
-\DeclareUnicodeAccent{\newtie}{"0311}
-\DeclareUnicodeAccent{\capitalnewtie}{"0311}
-%%\DeclareUnicodeSymbol{\textcapitalcompwordmark}{23}
-%%\DeclareUnicodeSymbol{\textascendercompwordmark}{31}
-\DeclareUnicodeSymbol{\textquotestraightbase}{"201A}
-\DeclareUnicodeSymbol{\textquotestraightdblbase}{"201E}
-\DeclareUnicodeSymbol{\texttwelveudash}{"2015}
-\DeclareUnicodeSymbol{\textthreequartersemdash}{"2012}
-\DeclareUnicodeSymbol{\textleftarrow}{"2190}
-\DeclareUnicodeSymbol{\textrightarrow}{"2192}
-\DeclareUnicodeSymbol{\textblank}{"2422}
-\DeclareUnicodeSymbol{\textdollar}{`\$}
-\DeclareUnicodeSymbol{\textquotesingle}{`\'}
-\DeclareUnicodeSymbol{\textasteriskcentered}{"204E}
-%% \DeclareUnicodeSymbol{\textdblhyphen}{45}
-\DeclareUnicodeSymbol{\textfractionsolidus}{"2044}
-%%\DeclareUnicodeSymbol{\textzerooldstyle}{48}
-%%\DeclareUnicodeSymbol{\textoneoldstyle}{49}
-%%\DeclareUnicodeSymbol{\texttwooldstyle}{50}
-%%\DeclareUnicodeSymbol{\textthreeoldstyle}{51}
-%%\DeclareUnicodeSymbol{\textfouroldstyle}{52}
-%%\DeclareUnicodeSymbol{\textfiveoldstyle}{53}
-%%\DeclareUnicodeSymbol{\textsixoldstyle}{54}
-%%\DeclareUnicodeSymbol{\textsevenoldstyle}{55}
-%%\DeclareUnicodeSymbol{\texteightoldstyle}{56}
-%%\DeclareUnicodeSymbol{\textnineoldstyle}{57}
-\DeclareUnicodeSymbol{\textlangle}{"27E8}
-\DeclareUnicodeSymbol{\textminus}{"2212}
-\DeclareUnicodeSymbol{\textrangle}{"27E9}
-\DeclareUnicodeSymbol{\textmho}{"2127}
-\DeclareUnicodeSymbol{\textbigcircle}{"25EF}
-\DeclareUnicodeAccent{\textcircled}{"20DD}
-\DeclareUnicodeSymbol{\textohm}{"2126}
-\DeclareUnicodeSymbol{\textlbrackdbl}{"301A}
-\DeclareUnicodeSymbol{\textrbrackdbl}{"301B}
-\DeclareUnicodeSymbol{\textuparrow}{"2191}
-\DeclareUnicodeSymbol{\textdownarrow}{"2193}
-\DeclareUnicodeSymbol{\textasciigrave}{`\`}
-\DeclareUnicodeSymbol{\textborn}{"2605} %% actually "black star" but close enough
-\DeclareUnicodeSymbol{\textdivorced}{"26AE}
-\DeclareUnicodeSymbol{\textdied}{"2020} %% different from "dagger"??
-%% \DeclareUnicodeSymbol{\textleaf}{108}
-\DeclareUnicodeSymbol{\textmarried}{"26AD}
-\DeclareUnicodeSymbol{\textmusicalnote}{"266A}
-\DeclareUnicodeSymbol{\texttildelow}{"02F7}
-%% \DeclareUnicodeSymbol{\textdblhyphenchar}{127} %% can't obtain this without deactivating font mapping :(
-\DeclareUnicodeSymbol{\textasciibreve}{"02D8}
-\DeclareUnicodeSymbol{\textasciicaron}{"02C7}
-\DeclareUnicodeSymbol{\textacutedbl}{"02DD}
-\DeclareUnicodeSymbol{\textgravedbl}{"02F5}
-\DeclareUnicodeSymbol{\textdagger}{"2020}
-\DeclareUnicodeSymbol{\textdaggerdbl}{"2021}
-\DeclareUnicodeSymbol{\textbardbl}{"2016}
-\DeclareUnicodeSymbol{\textperthousand}{"2030}
-\DeclareUnicodeSymbol{\textbullet}{"2022}
-\DeclareUnicodeSymbol{\textcelsius}{"2103}
-%% \DeclareUnicodeSymbol{\textdollaroldstyle}{138}
-%% \DeclareUnicodeSymbol{\textcentoldstyle}{139}
-\DeclareUnicodeSymbol{\textflorin}{"0192}
-\DeclareUnicodeSymbol{\textcolonmonetary}{"20A1}
-\DeclareUnicodeSymbol{\textwon}{"20A9}
-\DeclareUnicodeSymbol{\textnaira}{"20A6}
-%% \DeclareUnicodeSymbol{\textguarani}{144}
-\DeclareUnicodeSymbol{\textpeso}{"20B1}
-\DeclareUnicodeSymbol{\textlira}{"20A4}
-\DeclareUnicodeSymbol{\textrecipe}{"211E}
-\DeclareUnicodeSymbol{\textinterrobang}{"203D}
-\DeclareUnicodeSymbol{\textinterrobangdown}{"2E18}
-\DeclareUnicodeSymbol{\textdong}{"20AB}
-\DeclareUnicodeSymbol{\texttrademark}{"2122}
-\DeclareUnicodeSymbol{\textpertenthousand}{"2031}
-\DeclareUnicodeSymbol{\textpilcrow}{"00B6}
-\DeclareUnicodeSymbol{\textbaht}{"0E3F}
-\DeclareUnicodeSymbol{\textnumero}{"2116}
-\DeclareUnicodeSymbol{\textdiscount}{"2052}
-\DeclareUnicodeSymbol{\textestimated}{"212E}
-\DeclareUnicodeSymbol{\textopenbullet}{"25E6}
-\DeclareUnicodeSymbol{\textservicemark}{"2120}
-\DeclareUnicodeSymbol{\textlquill}{"2045}
-\DeclareUnicodeSymbol{\textrquill}{"2046}
-\DeclareUnicodeSymbol{\textcent}{"00A2}
-\DeclareUnicodeSymbol{\textsterling}{"00A3}
-\DeclareUnicodeSymbol{\textcurrency}{"00A4}
-\DeclareUnicodeSymbol{\textyen}{"00A5}
-\DeclareUnicodeSymbol{\textbrokenbar}{"00A6}
-\DeclareUnicodeSymbol{\textsection}{"00A7}
-\DeclareUnicodeSymbol{\textasciidieresis}{"00A8}
-\DeclareUnicodeSymbol{\textcopyright}{"00A9}
-\DeclareUnicodeSymbol{\textordfeminine}{"00AA}
-%% \DeclareUnicodeSymbol{\textcopyleft}{171}
-\DeclareUnicodeSymbol{\textlnot}{"00AC}
-\DeclareUnicodeSymbol{\textcircledP}{"2117}
-\DeclareUnicodeSymbol{\textregistered}{"00AE}
-\DeclareUnicodeSymbol{\textasciimacron}{"00AF}
-\DeclareUnicodeSymbol{\textdegree}{"00B0}
-\DeclareUnicodeSymbol{\textpm}{"00B1}
-\DeclareUnicodeSymbol{\texttwosuperior}{"00B2}
-\DeclareUnicodeSymbol{\textthreesuperior}{"00B3}
-\DeclareUnicodeSymbol{\textasciiacute}{"00B4}
-\DeclareUnicodeSymbol{\textmu}{"00B5}
-\DeclareUnicodeSymbol{\textparagraph}{"00B6}
-\DeclareUnicodeSymbol{\textperiodcentered}{"00B7}
-\DeclareUnicodeSymbol{\textreferencemark}{"203B}
-\DeclareUnicodeSymbol{\textonesuperior}{"00B9}
-\DeclareUnicodeSymbol{\textordmasculine}{"00BA}
-\DeclareUnicodeSymbol{\textsurd}{"221A}
-\DeclareUnicodeSymbol{\textonequarter}{"00BC}
-\DeclareUnicodeSymbol{\textonehalf}{"00BD}
-\DeclareUnicodeSymbol{\textthreequarters}{"00BE}
-\DeclareUnicodeSymbol{\texteuro}{"20AC}
-\DeclareUnicodeSymbol{\texttimes}{"00D7}
-\DeclareUnicodeSymbol{\textdiv}{"00F7}
-