summaryrefslogtreecommitdiff
path: root/fonts/kpfonts-otf/doc/Kpfonts-OTF-Doc-English.ltx
blob: 0bdbdc9f0106c103e5ce95d11d8c145f76109543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{pdfstandard=A-2b, lang=en-GB}
\documentclass[paper=a4]{scrartcl}
% Packages
\usepackage{graphics, array}
\usepackage[svgnames]{xcolor}
\usepackage[hypcap=false]{caption}
\usepackage{shortvrb}
% Option "longs" for local exemples of the long s
\usepackage[longs]{kpfonts-otf}

% Math demos
\setmathfont{KpMath-Regular.otf}[version=full,
                                 StylisticSet={1,2,3,4,5,6,7}]
\setmathfont{KpMath-Light.otf}[version=light]
\setmathfont{KpMath-Regular.otf}[version=base, CharacterVariant=3]
\setmathfont{KpMath-Bold.otf}[version=bold, Style=leqslant, CharacterVariant=3]
\setmathfont{KpMath-Sans.otf}[version=sans, Style=leqslant, CharacterVariant=3]

\usepackage[british,french]{babel} % french layout (lists, …)
\usepackage[english]{varioref}

\usepackage{realscripts}
\usepackage{microtype}
\usepackage{hyperref}
\hypersetup{pdftitle={Kpfonts-otf User’s Guide},
            pdfauthor={Daniel FLIPO},
            colorlinks
            }
\newcommand*{\hlabel}[1]{\phantomsection\label{#1}}
%
\MakeShortVerb{\|}

\newcommand*{\pkg}[1]{\texttt{#1}}
\newcommand*{\opt}[1]{\texttt{#1}}
\newcommand*{\optit}[1]{\textit{\color{DarkBlue}#1}}
\newcommand*{\file}[1]{\texttt{#1}}
\newcommand*{\style}[1]{\textsf{\textbf{#1}}}
\newcommand*{\cmd}[1]{\texttt{\textbackslash #1}}
\newcommand*{\family}[1]{\textsb{#1}}
\newcommand*{\famvar}[1]{\textit{#1}}

\title{Kp-fonts: OpenType version}
\author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}}
\newcommand*{\version}{0.43}

\begin{document}
\selectlanguage{british}
\maketitle
\thispagestyle{empty}

\mathversion{full}

\begin{abstract}
  This bundle provides OpenType versions of Type1 Kp-fonts designed by
  Christophe Caignaert. See \file{Kpfonts-Doc-English.pdf} for the  full
  documentation of the original Type1 fonts.

  It is usable only with LuaTeX or XeTeX engines; it consists of sixteen Text
  OpenType fonts, a Roman family \family{KpRoman} in eight shapes and weights
  ---\famvar{Regular}, \famvar{Italic}, \famvar{Bold},
  \famvar{Bold\-Italic}, \famvar{Light}, \famvar{Light\-Italic},
  \famvar{Semi\-bold}, \famvar{Semibold\-Italic}---, a Sans-Serif family
  \family{KpSans} and a TypeWriter family \family{KpMono}, each of them
  in four shapes and weights---\famvar{Regular}, \famvar{Italic},
  \famvar{Bold} and \famvar{Bold\-Italic}--- and five Math OpenType fonts
  \family{KpMath-Regular}, \family{KpMath-Bold}, \family{KpMath-Light},
  \family{KpMath-Semibold} and \family{KpMath-Sans}.

  \family{KpRoman} and \family{KpSans} families have small caps available in
  two sizes (SmallCaps and PetiteCaps), upper and lowercase digits
  ({\addfontfeatures{Numbers=Lowercase} 0123456789}), ancient ligatures
  {\addfontfeatures{Ligatures=Rare} ct, st} and
  {\addfontfeatures{Style=Swash}Q} a long-tailed capital Q.
  Superior and inferior digits and letters have been added to the OpenType
  \family{KpRoman} and \family{KpSans} fonts for footnotes’ calls and
  abbreviations 1\textsuperscript{st}, 2\textsuperscript{nd}…

  The support of text fonts covers Latin and Latin Extended~A (U+0020 to U+017F)
  but neither IPA nor Greek nor Cyrillic alphabets.

  For all Math fonts, Latin and Greek letters are available in Upright and
  Italic shapes, in Bold and Regular weights:
  $\symup{a}$ $\symup{\beta}$ $\symup{C}$ $\symup{\Delta}$,
  $\symit{a}$ $\symit{\beta}$ $\symit{C}$ $\symit{\Delta}$,
  $\symbfup{a}$ $\symbfup{\beta}$ $\symbfup{C}$ $\symbfup{\Delta}$,
  $\symbfit{a}$ $\symbfit{\beta}$ $\symbfit{C}$ $\symbfit{\Delta}$.

%  Blackboard Bold capitals are available in two shapes, Serif and Sans:
%  |\mathbb{ABC}| prints either
%  \mathversion{full}$\mathbb{ABC}$ (option |[Style=bbsans]|) or
%  \mathversion{base} $\mathbb{ABC}$ (default).
  Blackboard Bold capitals are available in two shapes, Serif and Sans:
  |\mathbb{ABC}| prints either
  \mathversion{base} $\mathbb{ABC}$ (default) or
  \mathversion{full}$\mathbb{ABC}$ (option |[Style=bbsans]|)
  Commands |\mathcal{ABC}| and |\mathscr{ABC}| print respectively
  \mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathscr{ABC}$
  while |\mathfrak{ABCabc}| prints $\mathfrak{ABCabc}$.

  File \file{unimath-kpfonts.pdf} shows the full list of Unicode Math symbols
  provided by Kp-fonts, compared with other common Math fonts.
  More symbols, specific to Kp-fonts, are listed in
  section~\ref{ssec:symb-spec-kp}.

  A style file \file{kpfont-otf.sty} is provided to load Kp-fonts easily.
  It is derived from \file{kpfont.sty} but options differ.

  Please beware of the \emph{experimental} status of the current
  version~(\version).

  All fonts are covered by OFL licence, style file and documentation
  are under LPPL-1.3 licence.
\end{abstract}

\newpage
\section{Loading \pkg{kpfonts-otf.sty}}

For users of the original \pkg{kpfonts.sty} package, the easiest way to
try the OpenType version is to load \pkg{kpfonts-otf.sty}:\\[.5\baselineskip]
|\usepackage[ |\optit{options}| ]{kpfonts-otf}|\\[.5\baselineskip]
this loads \pkg{unicode-math}, \pkg{fontspec} and \pkg{realscripts}, and defines
\family{KpRoman} (\family{Regular} or \family{Light} depending on options),
\family{KpSans} and \family{KpMono} as Text fonts, \family{KpMath}
(\family{Regular} or \family{Light} depending on options) as Math fonts.

\pkg{kpfonts-otf.sty} also defines all symbols available in \pkg{latexsym} and
\pkg{amssymb} under the same names%
\footnote{Unicode names often differ from AMS names.}
and a bunch of Kp-fonts specifics symbols.

\subsection{Global options for both Text and Maths}

\begin{description}
\item[light:] switches to \famvar{light} fonts, metrics are unchanged;
  \famvar{light} fonts might not look perfect on screen but they print fine.

  Please compare \famvar{regular} (left) and \famvar{light} fonts (right):

\newcommand*{\test}{Normal or light? Just a matter of taste}
\medskip

\begin{minipage}{.45\textwidth}\test. $E=mc^2$\end{minipage}\hfill
\begin{minipage}{.45\textwidth}\ltseries\test. \mathversion{light}$E=mc^2$
\end{minipage}

\medskip\mathversion{base}
\begin{minipage}{.45\textwidth}\itshape \test\end{minipage}\hfill
\begin{minipage}{.45\textwidth}\ltseries\itshape\test\end{minipage}

\medskip
\begin{minipage}{.45\textwidth}\bfseries \test\end{minipage}\hfill
\begin{minipage}{.45\textwidth}\sbseries \test\end{minipage}

\medskip
\begin{minipage}{.45\textwidth}\bfseries\itshape \test\end{minipage}\hfill
\begin{minipage}{.45\textwidth}\sbseries\itshape\test\end{minipage}

\medskip

\item[nomath:] load neither \pkg{unicode-math} nor \family{KpMath} fonts;
  useful for documents without Maths, or to choose other Math fonts.
\item[notext:] do not change any Text font, use the defaults.
\item[nosf:]   do not change Sans-Serif Text fonts, use the defaults.
\item[nott:]   do not change Typewriter Text fonts, use the defaults.
\item[onlyrm:] equivalent to the last two combined.
\item[fulloldstyle:] equivalent to options \opt{oldstyle} and
  \opt{oldstylemath}.
\item[fulloldstylenums:] equivalent to options \opt{oldstylenums} and
  \opt{oldstylenumsmath}.
\end{description}

\subsection{Options for Text fonts \emph{only}}

\begin{description}
\item[lighttext:] switches to \famvar{light} Text fonts.

  Two more weights are provided by \pkg{kpfonts-otf.sty}:
  with the \famvar{lighttext} (or \famvar{light}) option, \famvar{Semibold} and
  \famvar{Extrabold} vs \famvar{Light} and \famvar{Semibold} without it.
  These weights are available through |\ltseries|, |\sbseries| and
  |\ebseries| commands to be used in a group or alternatively through one
  argument commands |\textlt{}|,   |\textsb{}| and |\texteb{}|.

  |{\sbseries\itshape Foo}| or |\textsb{\textit{Foo}}| print
  {\sbseries\itshape Foo}.

\item[oldstylenums:] provides lowercase digits as a default.

  To get uppercase digits locally: |{\addfontfeature{Numbers=Lining} 123}|.

  Examples, upright, italic, bold and bolditalic:
  \begin{itemize}\addfontfeatures{Numbers=Lowercase}
	\item 0123456789 !
	\item \textit{0123456789 !}
	\item \textbf{0123456789 !}
	\item \textbf{\textit{0123456789 !}}
  \end{itemize}

\item[oldstyle:] provides lowercase digits as a default, long-tailed Q
  ({\addfontfeatures{Style=Swash}Quebec}) and (for Roman and Sans-Serif
  fonts only) old style ligatures
  {\addfontfeatures{Ligatures=Rare}« ct » et « st »}.

  Examples:
  \begin{itemize}\addfontfeatures{Style=Swash,Ligatures=Rare}
  \newcommand*{\test}{Quest for an attractive font!}
	\item \test
	\item \textit{\test}
	\item \textbf{\test}
	\item \textsc{\test}
	\item \textbf{\textit{\test}}
	\item \textsc{\textbf{\test}}
  \end{itemize}

\item[veryoldstyle:]  same as option \opt{oldstyle} but
  the round `s’  is replaced by the long one
  {\addfontfeatures{RawFeature=+hist;+hlig}`s\hspace{1sp}’},
  unless it ends a word (then it remains `s’)%
  \footnote{The OpenType \texttt{calt} feature is used to catch `s’ ending
    a word.}
  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,
  f.i. |\textit{some of Highlands’ mysterious castles…}|
  will print
  {\addfontfeatures{RawFeature=+hist;+hlig;+calt}%
    \textit{some of Highlands’ mysterious castles…}} which is correct;
  with XeTeX an \texttt{=} sign must be added at the end of
  \texttt{mysterious=}  to get a round `s’ there :
  final `s’ followed by a punctuation sign is never turned into
  {\addfontfeatures{RawFeature=+hist;+hlig}`s\hspace{1sp}’}, when followed by
  a space it is a trickier, see option \opt{longs} below.

\item[longs] \hlabel{longs}
  inhibits the transformation of an `s’ followed by a space into
  {\addfontfeatures{RawFeature=+hist;+hlig}`s\hspace{1sp}’}. This option,
  available only with LuaTeX, is silently switched on by \opt{veryoldstyle};
  it is used explicitly in the present document to deal with the examples of
  long `s’ shown in the preceeding item.

\item[largesmallcaps:] prints larger \textlsc{Small Caps} than the default
  ones (\textsc{Petite Caps}).

\item[altfligs :] prints alternative shapes for ligatures
  {\addfontfeatures{StylisticSet=1}fi, fl, ffi, ffl}
  instead of fi, fl, ffi, ffl.

\item[germandbls :] |\SS| prints {\addfontfeatures{StylisticSet=2}\SS} instead
  of {\char"1E9E} (capital \textit{Eszett}), ditto for small/petite caps.

\item[eurosym :] remplaces the Euro character (€) by the official symbol
  {\addfontfeatures{StylisticSet=3}(€)} (available in regular, italic,
  bold and  et bolditalic).
  %; the |\KPeuro| command is also provided to print
  %the official symbol, it accepts an optionnal argument : |\kpeuro[1,50]{}|
  %prints \kpeuro[1,50] (with a nobreak space).

\item[harfbuzz :] switches |Renderer=Harfbuzz| for HBLuaTeX engine;
  up to version 0.34, this renderer was silently activated but seldom useful.

\end{description}

\subsection{Options for Math fonts \emph{only}}

\begin{description}

\item[lightmath:] uses \famvar{light} Math fonts.

\item[bbsans:] command |\mathbb| prints Sans-Serif Blackboard Bold capitals
  with Serif fonts too: compare
  \mathversion{full}
  $\mathbb{C}$, $\mathbb{K}$, $\mathbb{N}$, $\mathbb{Q}$, $\mathbb{R}$,
  $\mathbb{Z}$, with
  \mathversion{base}
  $\mathbb{C}$, $\mathbb{K}$, $\mathbb{N}$, $\mathbb{Q}$, $\mathbb{R}$,
  $\mathbb{Z}$ (default).

%\item[mathcal:] forces commands |\mathcal| and |\mathscr| to print
%  \mathversion{full}$\mathcal{A,B,C,D}$  % $\mathscr{ABCD}$
%  instead of \mathversion{base} $\mathcal{A,B,C,D}$ (default).

\item[frenchstyle:] Latin uppercase letters and all Greek letters are
  printed upright, only lowercase latin letters are printed in italics;
  this follows the French typographic usage.

\item[oldstylenumsmath:] prints lowercase digits in Maths (default is
  uppercase).

\item[narrowiints:] prints condensed repeated integrals :

  \mathversion{full}$\iiint$ et $\displaystyle\iiint$
  \quad instead of \quad
  \mathversion{base}$\iiint$ et $\displaystyle\iiint$ (default).

\item[partialup:] the |\partial| symbol is printed upright $\symup{\partial}$
  instead of $\partial$.

\item[fancyReIm:] commands |\Re| et |\Im| print $\RE$ and $\IM$ respectively
  instead of $\Re$ et $\Im$.

\item[tight :] horizontal spaces tightened in math mode (same settings as
  \pkg{fourier-otf}).

\item[noDcommand:] do not define |\D| to avoid incompatibilities with other
  packages.

\end{description}

Please note that the \textsf{\textbf{mathcal}} option has been
deleted: commands |$\mathcal{ABC}$| and |$\mathscr{ABC}$| now print
\mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathcal{ABC}$
respectively when \pkg{kpfonts-otf.sty} is loaded.

\section{Another way to load Kp-fonts}
\label{sec:options-standard}

Loading Kp-fonts through \file{kpfonts-otf.sty} offers only a limited choice
of options; the standard commands \cmd{setmainfont}, \cmd{setsansfont},
\cmd{setmonofont}, \cmd{setmathfont} offer much more flexibility.

On the other hand, \file{kpfonts-otf.sty} defines a lot of useful commands
to access AMS and specific Kp-fonts symbols. Loading \pkg{kpfonts-otf} with
the \opt{symbols} option enables to get all these commands defined without
loading any font:
\begin{verbatim}
\usepackage[symbols]{kpfonts-otf}
\end{verbatim}
Please note that \pkg{unicode-math}%
\footnote{A carefull reading of both manuals \file{unicode-math.pdf} and
  \file{fonspec.pdf} (available in all TeX distributions) is required in
  order to take full advantage of these packages.}
(and \pkg{fontspec}) \emph{are loaded} by this procedure, no need to do it
again, unless specific options are required, then \pkg{unicode-math} has to be
loaded \emph{before} \pkg{kpfonts-otf}, f.i.:
\begin{verbatim}
\usepackage[math-style=ISO,bold-style=upright]{unicode-math}
\usepackage[symbols]{kpfonts-otf}
\end{verbatim}
Then, it is up to the user to load Kp-fonts with whatever option he/she likes
using commands\\[.5\baselineskip]
|\set...font{|\optit{font}|}[|\optit{options}|]|.

For documents requiring no Math fonts, loading \pkg{fontspec} and using
the |\set...font| commands is enough, no need to load \pkg{kpfonts-otf} at all.

\subsection{Options for Text fonts}

Here are the options available for Text Kp-fonts:
\begin{description}
\item[Numbers=Lowercase] to get lowercase digits
  {\addfontfeature{Numbers=Lowercase} 1,2,3} instead of 1,2,3;
  the defaut is\\   \style{Numbers=Lining}.

\item[SmallCapsFeatures = \{Letters=SmallCaps\}] the |\textsc{}| command
  will print larger \textlsc{Small Caps} than the default
  \textpsc{Petite Caps}.\\
  The default setting%
  \footnote{Changed in v0.37 to match the original \pkg{kpfonts} package.},
  is \style{SmallCapsFeatures = \{Letters=PetiteCaps\}}.

\item[Ligatures=TeX]  (default) |'|\quad|!`|\quad|?`|\quad|--|\quad |---|\quad
  print respectively\quad ’ \quad !` \quad ?`\quad -- \quad ---.

\item[Ligatures=Common] (default) automatic ligatures  ff ffi ffl fi fl.

\item[StylisticSet=1] provides an alternative for glyphs
  {\addfontfeature{StylisticSet=1} ffi ffl fi fl} (ff is unchanged).

\item[Ligatures=Required :] adds {\addfontfeature{Ligatures=Required} ft et tt}
  ligatures.

\item[Ligatures=Rare] adds {\addfontfeature{Ligatures=Rare} ct et st} ligatures.

\item[Style=Swash] to get the long-tailed capital
  Q: {\addfontfeature{Style=Swash}Queen, also in small caps (both sizes):
    \textpsc{Queen} and \textlsc{Queen}}.

\item[Style=Historic] replaces any instance of `s’ by the long variant
  {\addfontfeature{Style=Historic}s}. It is still possible to get a round
  `s’ coding it as `|s=|’ specially at end of words; see options
  \opt{veryoldstyle} and \opt{longs} p.~\pageref{longs} for more details.

\item[Ligatures=Historic] switches specific ligatures for the long
  {\addfontfeature{Style=Historic}s}:
   {\addfontfeature{Style=Historic,Ligatures=Historic} si, sl, st}.

\item[StylisticSet=2 :] |\SS| prints {\addfontfeatures{StylisticSet=2}\SS}
  instead of {\char"1E9E} (capital \textit{Eszett}), ditto for small/petite caps.

\item[StylisticSet=3 :] remplaces the Euro character (€) by the official symbol
  {\addfontfeatures{StylisticSet=3}(€)} (available in regular, italics,
  bold and  et bolditalic).

\end{description}

Options may be are chosen for each font, say:
\begin{verbatim}
\setmonofont{KpMono}[Numbers=Lowercase,Style=Historic]
\end{verbatim}
but can also be shared by different typefaces:
\begin{verbatim}
\defaultfontfeatures+[KpRoman,KpSans,KpMono]{Numbers=Lowercase}
\defaultfontfeatures+[KpRoman,KpSans]{%
  Ligatures = Rare,
  Style = Swash,
  SmallCapsFeatures = {Letters=PetiteCaps},
  }
\setmainfont{KpRoman}
\setsansfont{KpSans}
\setmonofont{KpMono}
\end{verbatim}
Notes : 1. |\setmonofont{KpMono}|, |\setsansfont{KpSans}|,
|\setmainfont{KpRoman}| rely on files \file{KpMono.fontspec},
\file{KpSans.fontspec} and \file{KpRoman.fontspec} installed by Kpfonts.

2. Note the |+| ending |\defaultfontfeatures+| : options are \emph{added},
not overwriting any other (including those of \file{fontspec.cfg}).

3. Options can be gathered: |Ligatures={Rare,Historic}| (with braces)
is equivalent to |Ligatures=Rare| and |Ligatures=Historic|.

4. These options can also be switched on and off \emph{locally}
using |\addfontfeatures| inside a group, f.i.\ to print lowercase digits
{\addfontfeatures{Numbers=Lowercase}1234576890} with a font loaded with option
|Numbers=Lining|:
\begin{verbatim}
{\addfontfeatures{Numbers=Lowercase}1234576890}
\end{verbatim}
Actually, a shortcut is available in this case: |\oldstylenums{1234576890}|.

5. With the \family{KpRoman}, it is possible to define two more weights
\famvar{Light} and \famvar{Semibold} borrowed from \family{KpLight}:
\begin{verbatim}
\newfontfamily\KpLight{KpLight}[<same options as KpRoman>]
\newcommand*{\ltseries}{\KpLight}
\newcommand*{\sbseries}{\KpLight\bfseries}
\DeclareTextFontCommand{\textlt}{\ltseries}
\DeclareTextFontCommand{\textsb}{\sbseries}
\end{verbatim}
  These weights are then available through |\ltseries|, |\sbseries| commands
  to be used in a group or alternatively through one argument commands
  |\textlt{}| and  |\textsb{}|.

  With the \family{KpLight}, weights \famvar{Semibold} and \famvar{Extrabold}
  can be defined similarly.

\subsection{Options for Math fonts}

The following options can be passed either to \pkg{unicode-math}%
\footnote{See the manual \file{unicode-math.pdf}.}
or to |\setmathfont{}|:
\begin{description}
\item[math-style =] \opt{ISO}, \opt{TeX} (défaut), \opt{french}, \opt{upright};
\item[bold-style =] \opt{ISO}, \opt{TeX} (défaut), \opt{upright};
\item[partial =] \opt{upright} (default italic);
\item[nabla =]  \opt{italic}  (default upright);
\end{description}

Seven `Style Variants’ are available with Kp-fonts, here are the first three:
\begin{description}
\item[Style=mathcal] (\texttt{+ss01}) commands |\mathcal{}| and |\mathscr{}|
  print \mathversion{full}$\mathcal{ABC}$ instead of
  \mathversion{base}$\mathcal{ABC}$ (default), see note below;

\item[Style=bbsans] (\texttt{+ss02}) |\mathbb{}| prints Sans-Serif
  Blackboard bold capitals \mathversion{full}$\mathbb{ABC}$ for Serif Math fonts
  \file{KpMath-Regular} and \file{KpMath-light} instead of
  \mathversion{base}$\mathbb{ABC}$ ;

\item[Style=narrowiints] (\texttt{+ss03}) provides condensed repeated integrals:
  \mathversion{full}$\iiint$ instead of
  \mathversion{base}$\iiint$ (default).
\end{description}

\textbf{Note:} if you want commands |$\mathcal{ABC}$| and |$\mathscr{ABC}$| to
print \mathversion{full}$\mathcal{ABC}$ and \mathversion{base}$\mathcal{ABC}$
repectively, you can use \pkg{unicode-math}’s option |range| this way:\\
|\setmathfont{KpMath-Regular}[|\optit{options}|]|\\
|\setmathfont{KpMath-Regular}[range={cal,bfcal},StylisticSet=1]|\\
Both lines are mandatory: the first one loads \family{KpMath} as usual while
the second one modifies |\mathcal{}| command’s output.

\vspace{\baselineskip}
The next four tables present the other Style Variants available:
\\[-.5\baselineskip]
  \begin{minipage}[t]{0.45\linewidth}\centering
    \captionof{table}{Style=leqslant (\texttt{+ss04})}\hlabel{ss04}
    \begin{tabular}{@{}lcc@{}}
      \hline
      Command           & Default        & Variant \\
      \hline
      \cmd{leq}         & $\leq$         & $\leqslant$ \\
      \cmd{geq}         & $\geq$         & $\geqslant$ \\
      \cmd{nleq}        & $\nleq$        & $\nleqslant$ \\
      \cmd{ngeq}        & $\ngeq$        & $\ngeqslant$ \\
      \cmd{leqq}        & $\leqq$        & $\leqqslant$ \\
      \cmd{geqq}        & $\geqq$        & $\geqqslant$ \\
      \cmd{eqless}      & $\eqless$      & $\eqslantless$ \\
      \cmd{eqgtr}       & $\eqgtr$       & $\eqslantgtr$ \\
      \cmd{lesseqgtr}   & $\lesseqgtr$   & $\lesseqslantgtr$ \\
      \cmd{gtreqless}   & $\gtreqless$   & $\gtreqslantless$ \\
      \cmd{lesseqqgtr}  & $\lesseqqgtr$  & $\lesseqqslantgtr$ \\
      \cmd{gtreqqless}  & $\gtreqqless$  & $\gtreqqslantless$ \\
      \hline
    \end{tabular}
  \end{minipage}\hspace{\fill}
  \begin{minipage}[t]{0.5\linewidth}\centering
    \captionof{table}{Style=smaller (\texttt{+ss05})}\hlabel{ss05}
    \begin{tabular}{@{}lcc@{}}
      \hline
      Command                & Default        & Variant \\
      \hline
      \cmd{mid}              & $\mid$              & $\shortmid$ \\
      \cmd{nmid}             & $\nmid$             & $\nshortmid$ \\
      \cmd{parallel}         & $\parallel$         & $\shortparallel$ \\
      \cmd{nparallel}        & $\nparallel$        & $\nshortparallel$ \\
      \cmd{parallelslant}    & $\parallelslant$    & $\shortparallelslant$ \\
      \cmd{nparallelslant}   & $\nparallelslant$   & $\nshortparallelslant$ \\
      \hline
    \end{tabular}
  \end{minipage}
  \par\noindent
  \begin{minipage}[t]{0.45\linewidth}\centering
    \captionof{table}{Style=subsetneq (\texttt{+ss06})}\hlabel{ss06}
    \begin{tabular}{@{}lcc@{}}
      \hline
      Command           & Default         & Variant \\
      \hline
      \cmd{subsetneq}   & $\subsetneq$    & $\varsubsetneq$ \\
      \cmd{supsetneq}   & $\supsetneq$    & $\varsupsetneq$ \\
      \cmd{subsetneqq}  & $\subsetneqq$   & $\varsubsetneqq$ \\
      \cmd{supsetneqq}  & $\supsetneqq$   & $\varsupsetneqq$ \\
      \hline
    \end{tabular}
  \end{minipage}\hspace{\fill}
  \begin{minipage}[t]{0.5\linewidth}\centering
    \captionof{table}{Style=parallelslant (\texttt{+ss07})}\hlabel{ss07}
    \begin{tabular}{@{}lcc@{}}
      \hline
      Command               & Default            & Variant \\
      \hline
      \cmd{parallel}        & $\parallel$        & $\parallelslant$ \\
      \cmd{nparallel}       & $\nparallel$       & $\nparallelslant$ \\
      \cmd{shortparallel}   & $\shortparallel$   & $\shortparallelslant$ \\
      \cmd{nshortparallel}  & $\nshortparallel$  & $\nshortparallelslant$ \\
      \hline
    \end{tabular}
  \end{minipage}

\vspace{\baselineskip}
Example: switching styles 4 (leqslant) and 6 (subsetneq) can be achieved
coding either\\
|\setmathfont{KpMath-Regular.otf}[StylisticSet={4,6}]|\quad or\\
|\setmathfont{KpMath-Regular.otf}[Style={leqslant,subsetneq}]|\\
but this second syntax is available only if \pkg{kpfonts-otf.sty} has been
loaded (eventually with the \opt{symbols} option).
\enlargethispage*{\baselineskip}

\vspace{\baselineskip}
\mathversion{full}
Table~\vref{cv} shows the available `Glyphs Variants’:

\begin{table}[ht]
  \centering
  \caption{Glyphs Variants}
  \hlabel{cv}
  \begin{tabular}{@{}>{\ttfamily}lccl@{}}
    \hline
           & Default       & Variant          & Command\\
    \hline
      cv00 & $\Re\quad\Im$ & $\RE\quad\IM$    & \cmd{Re}\quad\cmd{Im}\\
      cv01 & $\hslash$     & $\mithbar$       & \cmd{hslash} or \cmd{hbar} \\
      cv02 & $\emptyset$   & $\varemptyset$   & \cmd{emptyset} \\
      cv03 & $\epsilon$    & $\varepsilon$    & \cmd{epsilon} \\
      cv04 & $\kappa$      & $\varkappa$      & \cmd{kappa} \\
      cv05 & $\pi$         & $\varpi$         & \cmd{pi} \\
      cv06 & $\phi$        & $\varphi$        & \cmd{phi} \\
      cv07 & $\rho$        & $\varrho$        & \cmd{rho} \\
      cv08 & $\sigma$      & $\varsigma$      & \cmd{sigma} \\
      cv09 & $\theta$      & $\vartheta$      & \cmd{theta} \\
      cv10 & $\Theta$      & $\varTheta$      & \cmd{Theta}\\
    \hline
  \end{tabular}
\end{table}

\vspace{\baselineskip}
Example: with |\setmathfont{KpMath-Regular.otf}[CharacterVariant={3,6}]|\\
commands |\epsilon| and |\phi| print $\varepsilon$
and $\varphi$ instead of $\epsilon$ et $\phi$.
The same is true of course for all shapes and and weights (upright, bold,
bolditalic, sans-derif, etc.): f.i.\ with \opt{math-syle=french}, |\epsilon|
and |\phi| print $\symup{\varepsilon}$ and $\symup{\varphi}$ (upright).

Note about \cmd{hbar}: \pkg{unicode-math} defines \cmd{hbar} as
\cmd{hslash} (U+210F) while \pkg{amsmath} provides two different glyphs
(italic h with horizontal or diagonal stroke).\\
\pkg{kpfonts-otf} now follows \pkg{unicode-math}; the italic h with horizontal
stroke can be printed using \cmd{hslash} or \cmd{hbar} together with character
variant \texttt{cv01} or with \cmd{mithbar} (replacement for AMS’ command
\cmd{hbar}).

\section{Specific commands defined in \pkg{kpfonts-otf.sty}}

\subsection{Integrals}

Kp-fonts offers variants for integral symbols suitable for indefinite
integrals, they are coded as |\varint|, |\variint|, |\variiint|, |\variiiint|
and |\varidotsint|.  Compare $\int f(t)\,dt$ and $\varint f(t)\,dt$ and also

\[\int f(t)\,dt \qquad\text{and}\qquad\varint f(t)\,dt\]

|\D{...}| prints an upright `d’ and improves kernings around the differential
element:
|\displaystyle\varint f(t)\D{t}| prints	$\displaystyle\varint f(t)\D{t}$.


\subsection{Specific Math symbols}
\label{ssec:symb-spec-kp}

The next tables present symbols unavailable as Unicode characters, they
are coded in Kp-fonts’ private zone.

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
\verb=\mmapsto=&\mmapsto&\verb=\longmmapsto=&\longmmapsto\\
\verb=\mmapsfrom=&\mmapsfrom&\verb=\longmmapsfrom=&\longmmapsfrom\\
\verb=\Mmapsto=&\Mmapsto&\verb=\Longmmapsto=&\Longmmapsto\\
\verb=\Mmapsfrom=&\Mmapsfrom&\verb=\Longmmapsfrom=&\Longmmapsfrom\\
\verb=\leftrightdasharrow=&\leftrightdasharrow&\verb=\leadsto=&\leadsto
\end{tabular}\end{center}

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
\verb=\boxright=&\boxright&\verb=\boxleft=&\boxleft\\
\verb=\circleright=&\circleright&\verb=\circleleft=&\circleleft\\
\verb=\Diamondright=&\Diamondright&\verb=\Diamondleft=&\Diamondleft\\
\verb=\boxdotright=&\boxdotright&\verb=\boxdotleft=&\boxdotleft\\
\verb=\circledotright=&\circledotright&\verb=\circledotleft=&\circledotleft\\
\verb=\Diamonddotright=&\Diamonddotright&\verb=\Diamonddotleft=&\Diamonddotleft
\end{tabular}\end{center}

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
\verb=\boxRight=&\boxRight&\verb=\boxLeft=&\boxLeft\\
\verb=\boxdotRight=&\boxdotRight&\verb=\boxdotLeft=&\boxdotLeft\\
\verb=\DiamondRight=&\DiamondRight&\verb=\DiamondLeft=&\DiamondLeft\\
\verb=\DiamonddotRight=&\DiamonddotRight&\verb=\DiamonddotLeft=&\DiamonddotLeft
\end{tabular}\end{center}

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}}
\verb=\multimapdot=&\multimapdot&\verb=\multimapdotinv=&\multimapdotinv\\
\verb=\multimapdotboth=&\multimapdotboth\\
\verb=\multimapbothvert=&\multimapbothvert&\verb=\multimapdotbothvert=&\multimapdotbothvert\\
\verb=\multimapdotbothAvert=&\multimapdotbothAvert&\verb=\multimapdotbothBvert=&\multimapdotbothBvert
\end{tabular}\end{center}

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}|r>{$}c<{$}}
\verb=\capplus=&\capplus&\verb=\sqcupplus=&\sqcupplus&\verb=\sqcapplus=&\sqcapplus\\
\verb=\parallelslant=&\parallelslant&\verb=\colonsim=&\colonsim&\verb=\colonapprox=&\colonapprox\\
\verb=\parallelbackslant=&\parallelbackslant&\verb=\Colonsim=&\Colonsim&\verb=\Colonapprox=&\Colonapprox\\
\verb=\eqqColon=&\eqqColon&\verb=\Colondash=&\Colondash&\verb=\dashColon=&\dashColon\\
\end{tabular}\end{center}

\begin{center}\begin{tabular}{r>{$}c<{$}|r>{$}c<{$}|r>{$}c<{$}}
\verb=\strictif=&\strictif&\verb=\strictfi=&\strictfi&\verb=\strictiff=&\strictiff\\
\verb=\circledvee=&\circledvee&\verb=\circledwedge=&\circledwedge&\verb=\circledbar=&\circledbar\\
\verb=\openJoin=&\openJoin&\verb=\opentimes=&\opentimes&\verb=\VvDash=&\VvDash\\
\verb=\lambdaslash=&\lambdaslash&\verb=\lambdabar=&\lambdabar&\verb=\Wr=&\Wr
\end{tabular}\end{center}

\renewcommand{\arraystretch}{2}

\begin{center}
\begin{tabular}{r>{$}c<{$}c|r>{$}c<{$}c}

\verb+\idotsint+ &\idotsint& $\displaystyle\idotsint$\\
\verb+\ointclockwise+ &\ointclockwise&$\displaystyle\ointclockwise$
&\verb+\varointctrclockwise+&\varointctrclockwise& $\displaystyle\varointctrclockwise$\\
\verb+\oiintclockwise+ &\oiintclockwise&$\displaystyle\oiintclockwise$&\verb+\oiintctrclockwise+&\oiintctrclockwise&$\displaystyle\oiintctrclockwise$\\
\verb+\varoiintclockwise+&\varoiintclockwise& $\displaystyle\varoiintclockwise$&\verb+\varoiintctrclockwise+&\varoiintctrclockwise&$\displaystyle\varoiintctrclockwise$\\
\verb+\oiiintclockwise+ &\oiiintclockwise&$\displaystyle\oiiintclockwise$&\verb+\oiiintctrclockwise+ &\oiiintctrclockwise&$\displaystyle\oiiintctrclockwise$\\
\verb+\varoiiintclockwise+ &\varoiiintclockwise& $\displaystyle\varoiiintclockwise$&\verb+\varoiiintctrclockwise+&\varoiiintctrclockwise&$\displaystyle\varoiiintctrclockwise$\\
\verb+\sqiint+&\mbox{$\sqiint$}&$\displaystyle\sqiint$&\verb+\sqiiint+&\mbox{$\sqiiint$}&$\displaystyle\sqiiint$
\end{tabular}
\end{center}

The full list of Unicode symbols available with Kp-fonts is shown in file
\file{unimath-kpfonts.pdf}.

\subsection{Wide accents}

\begin{itemize}
\item \cmd{widehat} and \cmd{widetilde}
\[\widehat{x}\; \widehat{xx} \;\widehat{xxx} \;\widehat{xxxx}\;
  \widehat{xxxxx} \;\widehat{xxxxxx} \;\widetilde{x}\; \widetilde{xx}\;
  \widetilde{xxx} \;\widetilde{xxxx} \;\widetilde{xxxxx}\;
  \widetilde{xxxxxx}\]

\item \cmd{overline} and \cmd{underline}
  \[\overline{x}\quad \overline{xy}\quad \overline{xyz}\quad
    \overline{A\cup B}\quad \overline{A\cup (B\cap C)\cup D}\quad
    \underline{m+n+p}\]

\item \cmd{wideoverbar}, \cmd{widecheck}  et \cmd{widebreve}
  \[\wideoverbar{x}\quad \wideoverbar{xy}\quad \wideoverbar{xyz}\quad
    \widecheck{x}\quad \widecheck{xxxx}\quad \widecheck{xxxxxx}\quad
    \widebreve{x}\quad \widebreve{xxxx}\quad \widebreve{xxxxxx}
  \]

\item \cmd{overparen} and \cmd{underparen}
  \[\overparen{x}\quad \overparen{xy}\quad \overparen{xyz}\quad
    \mathring{\overparen{A\cup B}}\quad
    \overparen{A\cup (B\cap C)\cup D}^{\smwhtcircle}\quad
    \overparen{x+y}^{2}\quad \overparen{a+b+...+z}^{26}\]

\[\underparen{x}\quad \underparen{xz} \quad \underparen{xyz}
  \quad \underparen{x+z}_{2}\quad \underparen{a+b+...+z}_{26}\]

\item \cmd{overbrace} and \cmd{underbrace}
  \[\overbrace{a}\quad \overbrace{ab}\quad \overbrace{abc}\quad
  \overbrace{abcd}\quad \overbrace{abcde}\quad
  \overbrace{a+b+c}^{3}\quad \overbrace{ a+b+. . . +z }^{26}\]

\[\underbrace{a}\quad\underbrace{ab}\quad\underbrace{abc}\quad
  \underbrace{abcd}\quad \underbrace{abcde}\quad
  \underbrace{a+b+c}_{3}  \quad \underbrace{ a+b+...+z }_{26}\]

\item \cmd{overrightarrow} and \cmd{overleftarrow}
  \[\overrightarrow{v}\quad \overrightarrow{M}\quad \overrightarrow{vv}
  \quad \overrightarrow{AB}\quad \overrightarrow{ABC}
  \quad \overrightarrow{ABCD} \quad \overrightarrow{ABCDEFGH}.
\]

\[\overleftarrow{v}\quad \overleftarrow{M}\quad \overleftarrow{vv}
  \quad \overleftarrow{AB}\quad \overleftarrow{ABC}
  \quad \overleftarrow{ABCD} \quad \overleftarrow{ABCDEFGH}\]

\item Enfin \cmd{widearc} and \cmd{widearcarrow} (ou \cmd{overrightarc})
\[\widearc{AMB}\quad \widearcarrow{AMB}\]
\end{itemize}

\subsection{Math Versions}

Different versions of the \family{KpMath} fonts may be defined in the
document’s preamble:\\
|\setmathfont{KpMath-Regular.otf}[version=base|, \optit{options} |]|\\
|\setmathfont{KpMath-Bold.otf}[version=bold|, \optit{options} |]|\\
|\setmathfont{KpMath-Semibold.otf}[version=semibold|, \optit{options} |]|\\
|\setmathfont{KpMath-Sans.otf}[version=sans|, \optit{options} |]|\\
|\setmathfont{KpMath-Light.otf}[version=light|, \optit{options} |]|\\
then, it is easy to switch from one version to another one with
|\mathversion{|\optit{name}|}|.

\pagebreak[4]
Example\footnote{\mathversion{full}Option \opt{CharacterVariant=3} changes
$\epsilon$ into $\varepsilon$.} :
\begin{verbatim}
\setmathfont{KpMath-Regular.otf}[Style=leqslant, CharacterVariant=3]
\setmathfont{KpMath-Bold.otf}[version=bold,
                              Style=leqslant, CharacterVariant=3]
\setmathfont{KpMath-Sans.otf}[version=sans,
                              Style=leqslant, CharacterVariant=3]
\end{verbatim}

Here is the same equation in three versions, normal, bold and Sans-Serif:
\mathversion{base}

\[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
                     = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]

|\mathversion{bold}| \mathversion{bold}
\[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
                     = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]

|\mathversion{sans}| \mathversion{sans}
\[ \mathbb{E}_i(N_i) = \sum_{n\ge1} P_i(N_i\ge n)
                     = \frac{\epsilon_i}{1-\epsilon_i}<+\infty \]
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-master: t
%%% coding: utf-8
%%% End: