summaryrefslogtreecommitdiff
path: root/fonts/kpfonts-otf/tex/kpfonts-otf.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-06-22 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2023-06-22 03:01:06 +0000
commitac667b3d60d89dfd061e15583ed0062204ec705c (patch)
tree2a22ace0947c6691f783ba4a418000310d911817 /fonts/kpfonts-otf/tex/kpfonts-otf.sty
parent16d6a70c44a97b15c195cf6b10f59f3deadd0e66 (diff)
CTAN sync 202306220301
Diffstat (limited to 'fonts/kpfonts-otf/tex/kpfonts-otf.sty')
-rw-r--r--fonts/kpfonts-otf/tex/kpfonts-otf.sty82
1 files changed, 54 insertions, 28 deletions
diff --git a/fonts/kpfonts-otf/tex/kpfonts-otf.sty b/fonts/kpfonts-otf/tex/kpfonts-otf.sty
index 8ff8c69fc3..7ea1af9cc1 100644
--- a/fonts/kpfonts-otf/tex/kpfonts-otf.sty
+++ b/fonts/kpfonts-otf/tex/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