From d5395b52dba2ebe07547293e65ac15a5c02d9b4f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 15 Sep 2021 20:51:24 +0000 Subject: kpfonts-otf (15sep21) git-svn-id: svn://tug.org/texlive/trunk@60515 c570f23f-e606-0410-a88d-b1316a301751 --- .../fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx | 17 +++--- .../fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.pdf | Bin 192022 -> 191952 bytes .../fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.ltx | 58 +++++++++++--------- .../fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.pdf | Bin 194203 -> 194713 bytes Master/texmf-dist/doc/fonts/kpfonts-otf/README.md | 11 ++++ .../doc/fonts/kpfonts-otf/unimath-kpfonts.pdf | Bin 1814438 -> 1814383 bytes .../opentype/public/kpfonts-otf/KpMath-Bold.otf | Bin 196892 -> 196892 bytes .../opentype/public/kpfonts-otf/KpMath-Light.otf | Bin 458080 -> 458264 bytes .../opentype/public/kpfonts-otf/KpMath-Regular.otf | Bin 431524 -> 431712 bytes .../opentype/public/kpfonts-otf/KpMath-Sans.otf | Bin 278296 -> 278724 bytes .../public/kpfonts-otf/KpMath-Semibold.otf | Bin 198620 -> 198620 bytes .../opentype/public/kpfonts-otf/KpMono-Bold.otf | Bin 57768 -> 57916 bytes .../public/kpfonts-otf/KpMono-BoldItalic.otf | Bin 64992 -> 65136 bytes .../opentype/public/kpfonts-otf/KpMono-Italic.otf | Bin 66300 -> 66440 bytes .../opentype/public/kpfonts-otf/KpMono-Regular.otf | Bin 58904 -> 59052 bytes .../opentype/public/kpfonts-otf/KpRoman-Bold.otf | Bin 132172 -> 132232 bytes .../public/kpfonts-otf/KpRoman-BoldItalic.otf | Bin 142796 -> 142764 bytes .../opentype/public/kpfonts-otf/KpRoman-Italic.otf | Bin 134364 -> 132992 bytes .../opentype/public/kpfonts-otf/KpRoman-Light.otf | Bin 130416 -> 130476 bytes .../public/kpfonts-otf/KpRoman-LightItalic.otf | Bin 135272 -> 135332 bytes .../public/kpfonts-otf/KpRoman-Regular.otf | Bin 131068 -> 131128 bytes .../public/kpfonts-otf/KpRoman-Semibold.otf | Bin 129420 -> 129480 bytes .../public/kpfonts-otf/KpRoman-SemiboldItalic.otf | Bin 140584 -> 140444 bytes .../opentype/public/kpfonts-otf/KpSans-Bold.otf | Bin 102972 -> 103124 bytes .../public/kpfonts-otf/KpSans-BoldItalic.otf | Bin 110904 -> 111128 bytes .../opentype/public/kpfonts-otf/KpSans-Italic.otf | Bin 110936 -> 111088 bytes .../opentype/public/kpfonts-otf/KpSans-Regular.otf | Bin 102384 -> 102540 bytes .../tex/latex/kpfonts-otf/kpfonts-otf.sty | 60 +++++++++++++++++++-- 28 files changed, 109 insertions(+), 37 deletions(-) diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx index c7700bbc269..896999c02ab 100644 --- a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx +++ b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.ltx @@ -6,7 +6,13 @@ \usepackage[svgnames]{xcolor} \usepackage[hypcap=false]{caption} \usepackage{shortvrb} -\usepackage{kpfonts-otf} +\usepackage[veryoldstyle]{kpfonts-otf} +\defaultfontfeatures+[\ttfamily]{RawFeature={-hist;-calt;-swsh;-onum}} +\defaultfontfeatures+[KpRoman,KpLight,\sffamily]{% + RawFeature={-hist;-hlig;-calt;-swsh;-rlig;-onum},% +} +\setmainfont{KpRoman} +\setsansfont{KpSans} \setmonofont{KpMono}[Color=DarkBlue] %Math demos \setmathfont{KpMath-Regular.otf}[version=full, CharacterVariant=3, @@ -41,8 +47,8 @@ \title{Kp-fonts: OpenType version} \author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}} -\newcommand*{\version}{0.37} -\date{18th August, 2021} +\newcommand*{\version}{0.38} +\date{12th September, 2021} \begin{document} \selectlanguage{british} @@ -216,10 +222,7 @@ and a bunch of Kp-fonts specifics symbols. and ancient ligatures {\addfontfeatures{RawFeature=+hist;+hlig} si, sl, st} are activated. Coding \texttt{s=} prints a round `s’ anytime; in most cases this coding is - not necessary with LuaTeX% - \footnote{TeX’s \tild{} char (nobreakspace) fails to be recognised as ending - a word: \texttt{boys\tild{}band} prints - {\addfontfeatures{RawFeature=+hist;+hlig}boys~band}.}, + not necessary with LuaTeX, f.i. |\textit{some of Highlands’ mysterious castles…}| will print {\addfontfeatures{RawFeature=+hist;+hlig;+calt}% diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.pdf b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.pdf index 73a44095b22..da945629e5b 100644 Binary files a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.pdf and b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-English.pdf differ diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.ltx b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.ltx index 658013b7a21..175f2b775db 100644 --- a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.ltx +++ b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.ltx @@ -6,9 +6,19 @@ \usepackage[svgnames]{xcolor} \usepackage[hypcap=false]{caption} \usepackage{shortvrb} -\usepackage{kpfonts-otf} +\usepackage[veryoldstyle]{kpfonts-otf} % active la fonction "add_EoW" +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% On annule l’effet de l’option "veryoldstyle" tout en gardant "add_EoW" +\defaultfontfeatures+[\ttfamily]{RawFeature={-hist;-calt;-swsh;-onum}} +\defaultfontfeatures+[KpRoman,KpLight,\sffamily]{% + RawFeature={-hist;-hlig;-calt;-swsh;-rlig;-onum},% +} +% Recharger les fontes avec les nouvelles "features" : +\setmainfont{KpRoman} +\setsansfont{KpSans} \setmonofont{KpMono}[Color=DarkBlue] -% Pour les démos : +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%Pour les démos : \setmathfont{KpMath-Regular.otf}[version=full, CharacterVariant=3, StylisticSet={1,2,3,4,5,6,7}] @@ -43,8 +53,8 @@ \title{Kp-fonts version OpenType} \author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}} -\newcommand*{\version}{0.37} -\date{18 août 2021} +\newcommand*{\version}{0.38} +\date{12 septembre 2021} \begin{document} \maketitle @@ -225,31 +235,29 @@ Notez que ces options n'affectent que les polices de texte. remplacé par le « {\addfontfeatures{RawFeature=+hist;+hlig}s} » long sauf en fin de mot (où il doit rester rond) et les ligatures {\addfontfeatures{RawFeature=+hist;+hlig} si, sl, st} sont activées. - Ceci fonctionne assez bien avec LuaTeX : le codage\\ - |\textit{« Des espoirs si funestes… »}| donne - {\addfontfeatures{RawFeature=+hist;+hlig;+fina;+calt} + Avec LuaTeX, le codage |\textit{« Des espoirs si funestes… »}| donne bien + {\addfontfeatures{RawFeature=+hist;+hlig;+calt} \textit{«Des espoirs si funestes…»}. } - Les choses se passent bien tant que le « s » est immédiatement suivi - d’une espace Unicode (U+0020 espace sécable de base, U+00A0 espace-mot - insécable, U+202F fine insécable) ou d’un signe de ponctuation (virgule, - point, etc.) \emph{mais pas} s’il est suivi d’une espace - insécable produite par TeX (sous la forme pénalité + espace)% + Les choses se passent bien tant que le « s » est immédiatement suivi des + \emph{caractères} Unicode U+0020 espace-mot, + U+00A0 espace-mot insécable, U+202F fine insécable + ou d’un signe de ponctuation (virgule, point, etc.) \emph{mais pas} s’il est + suivi d’une espace (sécable ou non) produite par TeX% \footnote{On utilise la \emph{feature} OpenType \texttt{calt} qui ne - reconnaît pas les \cmd{penalty} de TeX.} ! - - Exemple : le codage |\textit{espoirs, mais quels~espoirs.}| produit - {\addfontfeatures{RawFeature=+hist}\textit{espoirs, mais quels~espoirs?}} - - Même problème devant la ponctuation haute en français, sauf à utiliser - l’option |UnicodeNoBreakSpaces| de \pkg{babel-french}. On doit - forcer le «s» rond final en codant \texttt{s=} : - |\textit{espoirs? désespoirs=!}| produit - {\addfontfeatures{RawFeature=+hist}\textit{espoirs? désespoirs=!}} - - Avec XeTeX il faut forcer le «s» rond final avant toutes les espaces - en codant \texttt{s=}. + reconnaît ni les \cmd{hskip} ni les \cmd{penalty} de TeX.} ! + Un contournement est fourni dans \file{kpfont-otf.sty} uniquement pour le + moteur LuaTeX. + + Exemple : le codage |\textit{espoirs, mais quels~espoirs?}| produit comme il + se doit en français + {\addfontfeatures{RawFeature=+hist;+calt}\textit{espoirs, mais~quels~espoirs?}} + (avec fine insécable devant le `?’). + + Il est toujours possible de forcer un «s» rond en codant \texttt{s=}. + %Pour obtenir le même résultat avec XeTeX, il faudrait coder:\\ + Avec XeTeX, il faudrait coder: |\textit{espoirs, mais= quels=~espoirs=?}|. \item[largesmallcaps :] produit des petites capitales plus \textlsc{Grandes} que par les \textsc{Petites} obtenues par défaut. diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.pdf b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.pdf index 04075c8f6be..88966bd0366 100644 Binary files a/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.pdf and b/Master/texmf-dist/doc/fonts/kpfonts-otf/Kpfonts-OTF-Doc-French.pdf differ diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/README.md b/Master/texmf-dist/doc/fonts/kpfonts-otf/README.md index 8153fabc143..b936a57357b 100644 --- a/Master/texmf-dist/doc/fonts/kpfonts-otf/README.md +++ b/Master/texmf-dist/doc/fonts/kpfonts-otf/README.md @@ -141,6 +141,17 @@ Either version 1.3 or, at your option, any later version. - \perp, \bot, \rightangle, \angle, \measuredangle, \sphericalangle shifted up, their bottom rests on the baseline now. +* v. 0.38: + + 1. Text fonts: + - Glyphs U+200B (zero width space) and U+2060 (word joiner) added. + - Improved option "veryoldstyle" (luatex only): a final "s" is no longer + turned into the long variant. + - Fixed kerning after "f" in KpSans-BoldItalic. + 2. Math fonts: + - Added bold versions to \dotlessi, \dotlessj, named \mbfdotlessi, + \mbfdotlessj (\mbfimath and \mbfjmath were already available). + --- Copyright 2020-2021 Daniel Flipo E-mail: daniel (dot) flipo (at) free (dot) fr diff --git a/Master/texmf-dist/doc/fonts/kpfonts-otf/unimath-kpfonts.pdf b/Master/texmf-dist/doc/fonts/kpfonts-otf/unimath-kpfonts.pdf index 261e59fb10a..fce6666fdf1 100644 Binary files a/Master/texmf-dist/doc/fonts/kpfonts-otf/unimath-kpfonts.pdf and b/Master/texmf-dist/doc/fonts/kpfonts-otf/unimath-kpfonts.pdf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Bold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Bold.otf index 5917d76e6ec..65ccbbcca2b 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Bold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Bold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Light.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Light.otf index afb47c0e6d4..f481fc329b3 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Light.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Light.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf index 618fff9aa69..928570640c2 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Regular.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Sans.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Sans.otf index da0cca17b58..dfe7ec9c266 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Sans.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Sans.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Semibold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Semibold.otf index af8534b9842..f3c36e3dda4 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Semibold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMath-Semibold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Bold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Bold.otf index bff9f515272..e621eafc816 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Bold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Bold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-BoldItalic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-BoldItalic.otf index d4de33abed7..b6fd35ccc49 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-BoldItalic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-BoldItalic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Italic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Italic.otf index 030f86f6f00..3c0f2ee437e 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Italic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Italic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Regular.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Regular.otf index 4b7403fb887..cbab0a41977 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Regular.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpMono-Regular.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Bold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Bold.otf index 0fb377a82fb..35a26ab13e5 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Bold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Bold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-BoldItalic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-BoldItalic.otf index 9f532c48cf7..2e763601cd3 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-BoldItalic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-BoldItalic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Italic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Italic.otf index 36190b31f3b..954690297a7 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Italic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Italic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Light.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Light.otf index d177afe4292..6537fe4ecd0 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Light.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Light.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-LightItalic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-LightItalic.otf index 15eae3304f3..492a3d28d8e 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-LightItalic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-LightItalic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Regular.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Regular.otf index 06c7d0a7366..57136c6bc58 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Regular.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Regular.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Semibold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Semibold.otf index f3b9962fc23..64fc5f0ff19 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Semibold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-Semibold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-SemiboldItalic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-SemiboldItalic.otf index cfde95e7785..9895e5ad225 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-SemiboldItalic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpRoman-SemiboldItalic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Bold.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Bold.otf index 69071cff034..9e932fc8bd4 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Bold.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Bold.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-BoldItalic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-BoldItalic.otf index 903c52ae743..f8755f656c5 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-BoldItalic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-BoldItalic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Italic.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Italic.otf index b4aff31ac3c..319022349d3 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Italic.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Italic.otf differ diff --git a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Regular.otf b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Regular.otf index 1c160b94e1c..ba5fc06118c 100644 Binary files a/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Regular.otf and b/Master/texmf-dist/fonts/opentype/public/kpfonts-otf/KpSans-Regular.otf differ 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 9c9c4221f4e..434ba2bd632 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.37} -\def\filedate{2021-08-18} +\def\fileversion{0.38} +\def\filedate{2021-09-12} \ProvidesPackage{kpfonts-otf}[\filedate\space\fileversion] % Ensure luatex or xetex engine @@ -82,7 +82,7 @@ \newfontfamily\KpRoman{KpRoman} \newfontfamily\KpLight{KpLight} % Euro symbol - \newcommand*{\kp@euro}{\char"E990\relax} + \newcommand*{\kp@euro}{\ifkp@eurosym\char"E990 \else\char"20AC \fi} \newcommand*{\kpeuro}[1][]{\def\@tmp{#1}% \ifx\@tmp\@empty \kp@euro \else #1~\kp@euro\fi } @@ -115,6 +115,54 @@ \fi \defaultfontfeatures+[KpRoman,KpLight,\sffamily]{% Style=Historic,Ligatures=Historic,Contextuals=Alternate} + \ifluatex + % This function adds character U+200B (zero width space) when an "s" + % is followed by a TeX space (glue or penalty) so that it is not turned + % into a long "s" by the "calt" feature. + \directlua{% + function add_eow_char (head) + local eow = 0x200B + local GLUE = node.id("glue") + local GLYPH = node.id("glyph") + local SPSKIP = 13 + local PENALTY = node.id("penalty") + local Longs = + {[string.byte("s")] = true} + local new_node = node.new + local copy_node = node.copy + local insert_node_after = node.insert_after + % Perserve TeX's kerning + head = node.kerning(head) + % wordbd is the zero width node to add + local wordbd = new_node(GLYPH) + for item in node.traverse_id(GLYPH, head) do + if Longs[item.char] then + local fid = item.font + % Check if char U+200B is available in the current font: + % code borrowed from file "luaotfload-auxiliary.lua". + local fontdata = fonts.hashes.identifiers[fid] + if fontdata and fontdata.characters[eow] then + nxt = item.next + if not nxt or (nxt.id == GLUE and nxt.subtype == SPSKIP) + or nxt.id == PENALTY then + wordbd.font = fid + wordbd.char = eow + wordbd.attr = item.attr + insert_node_after(head,item,copy_node(wordbd)) + end + end + end + end + end + } + % Register *after* loading babel-french! + \AtBeginDocument{% + \directlua{ + luatexbase.add_to_callback("kerning", add_eow_char, + "add_end_of_word_boundary"); + } + } + \fi \fi % Smallcaps \ifkp@largesmallcaps @@ -259,9 +307,11 @@ \Umathchardef\lambdabar = 0 0 "E02A \relax \Umathchardef\mbfvec = 0 0 "E044 \relax \Umathchardef\mbfwp = 0 0 "E045 \relax - \Umathchardef\mbfimath = 0 0 "E046 \relax - \Umathchardef\mbfjmath = 0 0 "E047 \relax + \Umathchardef\mbfdotlessi = 0 0 "E046 \relax + \Umathchardef\mbfdotlessj = 0 0 "E047 \relax \Umathchardef\mbfell = 0 0 "E049 \relax + \Umathchardef\mbfimath = 0 0 "E066 \relax + \Umathchardef\mbfjmath = 0 0 "E067 \relax \Umathchardef\mbhbar = 0 0 "E068 \relax \Umathchardef\mbhslash = 0 0 "E06F \relax \Umathchardef\mithbar = 0 0 "E078 \relax -- cgit v1.2.3