| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
\_famdecl [KP Fonts] \Kpfonts {KP fonts -- Johannes Kepler project} |
| 4 |
{\sans \mono \light \caps \swash} {\rm \bf \it \bi} {KpMath} |
| 5 |
{[KpRoman-Regular]} |
| 6 |
{\_def\_fontnamegen {[Kp\_subfamV-\_currV]:\_capsV\_swaV\_fontfeatures}} |
| 7 |
|
| 8 |
\_wlog{\_detokenize{% |
| 9 |
Modifiers:^^J |
| 10 |
\sans ...... sans serif^^J |
| 11 |
\mono ...... non-proportional^^J |
| 12 |
\light ..... light (\rm, \it) + semibold (\bf, \bi) variants^^J |
| 13 |
\caps ...... caps & small caps^^J |
| 14 |
\swash ..... alternative Q letter^^J |
| 15 |
}} |
| 16 |
|
| 17 |
\_def\_RBIfvars{\_fvars Regular Bold Italic BoldItalic } |
| 18 |
\_moddef \resetmod {\_fsetV subfam=Roman,caps={},swa={} \_RBIfvars } |
| 19 |
\_moddef \sans {\_fsetV subfam=Sans \_RBIfvars } |
| 20 |
\_moddef \mono {\_fsetV subfam=Mono \_RBIfvars } |
| 21 |
\_moddef \light {\_fsetV subfam=Roman \_fvars Light Semibold LightItalic SemiboldItalic } |
| 22 |
\_moddef \caps {\_fsetV caps=+smcp;\_ffonum; } |
| 23 |
\_moddef \nocaps {\_fsetV caps={} } |
| 24 |
\_moddef \swash {\_fsetV swa=+swsh; } |
| 25 |
\_moddef \noswash {\_fsetV swa={} } |
| 26 |
|
| 27 |
\_initfontfamily % new font family must be initialized |
| 28 |
|
| 29 |
\_loadmath {[KpMath-Regular]} |
| 30 |
\_loadboldmath {[KpMath-Bold]} \to {[KpMath-Regular]} |
| 31 |
|
| 32 |
\_endcode |
| 33 |
|
| 34 |
The KP fonts family includes more variants of Math fonts. |
| 35 |
Only Regular / Bold pair is loaded as default. |
| 36 |
|
| 37 |
There are alternatives: |
| 38 |
|
| 39 |
\doloadmath \loadmath {KpMath-Light} |
| 40 |
\loadboldmath {[KpMath-Semibold]} \to {[KpMath-Light]} |
| 41 |
|
| 42 |
or |
| 43 |
|
| 44 |
\doloadmath \loadmath {KpMath-Sans} |
| 45 |
|