diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-21 20:06:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-21 20:06:52 +0000 |
commit | ef92b2e8e8c0dc6e8fdbeaec53d03a2e6eb53361 (patch) | |
tree | d0354cba57bdbedd0dbf728c767d747d4da0a717 /Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty | |
parent | 98f0adb10cb5a1498e7bba25b412e9b17aede493 (diff) |
kpfonts-otf (21jun23)
git-svn-id: svn://tug.org/texlive/trunk@67428 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty | 82 |
1 files changed, 54 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty b/Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty index 8ff8c69fc3f..7ea1af9cc12 100644 --- a/Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty +++ b/Master/texmf-dist/tex/latex/kpfonts-otf/kpfonts-otf.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e}[2019-01-01] -\def\fileversion{0.53} -\def\filedate{2023-05-27} +\def\fileversion{0.54} +\def\filedate{2023-06-21} \ProvidesPackage{kpfonts-otf}[\filedate\space\fileversion] % Ensure luatex or xetex engine @@ -13,6 +13,8 @@ \newif\ifkp@tt \kp@tttrue % \newif\ifkp@lighttext +\newif\ifkp@sftext +\newif\ifkp@sans \newif\ifkp@largesmallcaps \newif\ifkp@altfligs \newif\ifkp@eurosym @@ -24,6 +26,7 @@ \newif\ifkp@Qtail % \newif\ifkp@lightmath +\newif\ifkp@sfmath \newif\ifkp@osnm \newif\ifkp@narrowiints \newif\ifkp@partialup @@ -39,6 +42,7 @@ \DeclareOption{light} {\kp@lighttexttrue\kp@lightmathtrue} \DeclareOption{nomath} {\kp@mathfalse\kp@symbolsfalse} \DeclareOption{notext} {\kp@textfalse} +\DeclareOption{sans} {\kp@sftexttrue\kp@sfmathtrue} \DeclareOption{nosf} {\kp@sffalse} \DeclareOption{nott} {\kp@ttfalse} \DeclareOption{onlyrm} {\kp@ttfalse\kp@sffalse} @@ -47,6 +51,7 @@ \kp@osnmtrue} % Text options \DeclareOption{lighttext} {\kp@lighttexttrue} +\DeclareOption{sftext} {\kp@sftexttrue} \DeclareOption{oldstylenums} {\kp@osntrue} \DeclareOption{oldstyle} {\kp@ostrue\kp@osntrue\kp@Qtailtrue} \DeclareOption{veryoldstyle} {\kp@vostrue\kp@osntrue\kp@Qtailtrue} @@ -57,6 +62,7 @@ \DeclareOption{harfbuzz} {\kp@harfbuzztrue} % Math options \DeclareOption{lightmath} {\kp@lightmathtrue} +\DeclareOption{sfmath} {\kp@sfmathtrue} \DeclareOption{bbsans} {\kp@sfmathbbtrue} \DeclareOption{mathcal} {\kp@calasscrtrue} \DeclareOption{narrowiints} {\kp@narrowiintstrue} @@ -146,22 +152,26 @@ \defaultfontfeatures+[KpRoman,KpLight,\sffamily]{StylisticSet=3} \fi % Loading Text Serif fonts: - \ifkp@lighttext - \setmainfont{KpLight} - \renewfontfamily\KpLight{KpLight} - \renewfontfamily\KpRoman{KpRoman} - \newcommand*{\sbseries}{\KpRoman} - \newcommand*{\ebseries}{\KpRoman\bfseries} - \DeclareTextFontCommand{\textsb}{\sbseries} - \DeclareTextFontCommand{\texteb}{\ebseries} + \ifkp@sftext + \setmainfont{KpSans} \else - \setmainfont{KpRoman} - \renewfontfamily\KpRoman{KpRoman} - \renewfontfamily\KpLight{KpLight} - \newcommand*{\sbseries}{\KpLight\bfseries} - \newcommand*{\ltseries}{\KpLight} - \DeclareTextFontCommand{\textsb}{\sbseries} - \DeclareTextFontCommand{\textlt}{\ltseries} + \ifkp@lighttext + \setmainfont{KpLight} + \renewfontfamily\KpLight{KpLight} + \renewfontfamily\KpRoman{KpRoman} + \newcommand*{\sbseries}{\KpRoman} + \newcommand*{\ebseries}{\KpRoman\bfseries} + \DeclareTextFontCommand{\textsb}{\sbseries} + \DeclareTextFontCommand{\texteb}{\ebseries} + \else + \setmainfont{KpRoman} + \renewfontfamily\KpRoman{KpRoman} + \renewfontfamily\KpLight{KpLight} + \newcommand*{\sbseries}{\KpLight\bfseries} + \newcommand*{\ltseries}{\KpLight} + \DeclareTextFontCommand{\textsb}{\sbseries} + \DeclareTextFontCommand{\textlt}{\ltseries} + \fi \fi % Loading Text Sans Serif fonts: \ifkp@sf @@ -220,24 +230,38 @@ \ifkp@partialup \Store@KP@MOption{partial}{upright} \fi - \ifkp@lightmath + \ifkp@sfmath + \Store@KP@MOption{BoldFont}{KpMath-SansBold.otf} % Following Joseph Wright in https://tex.stackexchange.com/questions/451 \begingroup \edef\temp{% \endgroup - \noexpand\setmathfont{KpMath-Light.otf}% + \noexpand\setmathfont{KpMath-Sans.otf}% [\unexpanded\expandafter{\the\KpMtoks}]% } - \temp - \setmathfont{KpMath-Light.otf}[range={cal,bfcal},RawFeature=+ss01] + \temp + \setmathfont{KpMath-Sans.otf}[range={cal,bfcal},RawFeature=+ss01] \else - % Following Joseph Wright in https://tex.stackexchange.com/questions/451 - \begingroup - \edef\temp{% - \endgroup - \noexpand\setmathfont{KpMath-Regular.otf}% - [\unexpanded\expandafter{\the\KpMtoks}]% - } + \ifkp@lightmath + \Store@KP@MOption{BoldFont}{KpMath-Semibold.otf} + % Following Joseph Wright in https://tex.stackexchange.com/questions/451 + \begingroup + \edef\temp{% + \endgroup + \noexpand\setmathfont{KpMath-Light.otf}% + [\unexpanded\expandafter{\the\KpMtoks}]% + } + \temp + \setmathfont{KpMath-Light.otf}[range={cal,bfcal},RawFeature=+ss01] + \else + % Following Joseph Wright in https://tex.stackexchange.com/questions/451 + \Store@KP@MOption{BoldFont}{KpMath-Bold.otf} + \begingroup + \edef\temp{% + \endgroup + \noexpand\setmathfont{KpMath-Regular.otf}% + [\unexpanded\expandafter{\the\KpMtoks}]% + } \temp \setmathfont{KpMath-Regular.otf}[range={cal,bfcal},RawFeature=+ss01] \fi @@ -254,6 +278,8 @@ \newopentypefeature{Style}{parallelslant}{ss07} \AtBeginDocument{% % Kpfonts specific math symbols + \Umathchardef\dotlessi = 0 0 "0131 \relax + \Umathchardef\dotlessj = 0 0 "0237 \relax \Umathchardef\mitsanswp = 0 0 "E015 \relax \Umathchardef\mitsansell = 0 0 "E019 \relax \Umathchardef\varemptyset = 0 0 "E021 \relax |