summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/optex/base/fonts-select.opm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/optex/base/fonts-select.opm')
-rw-r--r--Master/texmf-dist/tex/optex/base/fonts-select.opm40
1 files changed, 26 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/optex/base/fonts-select.opm b/Master/texmf-dist/tex/optex/base/fonts-select.opm
index 740b311a677..eab114fcc48 100644
--- a/Master/texmf-dist/tex/optex/base/fonts-select.opm
+++ b/Master/texmf-dist/tex/optex/base/fonts-select.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2021-02-25>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2021-04-22>} % preloaded in format
\_doc -----------------------------
\`\initunifonts` macro extends \LuaTeX's font capabalities,
@@ -114,7 +114,10 @@
`<value-b>` or ... or `<value-z>`.
\nl
\`\_prepcommalist` `ab,{},cd,\_end,` expands to `ab,,cd,` (auxiliary macro
- used in `\_onlyif`).
+ used in `\_onlyif`).\nl
+ \`\_ffonum` is a shortcut for oldstyle digits font features used in
+ font family files. You can do `\let\_ffonum=\ignoreit` if you don't want
+ to set old digits together with `\caps`.
\_cod -----------------------------
\_def\_fvars #1 #2 #3 #4 {%
@@ -137,6 +140,7 @@
\_iftrue #3\_fi
}
\_def\_prepcommalist#1,{\_ifx\_end#1\_empty\_else #1,\_ea\_prepcommalist\_fi}
+\_def\_ffonum {+onum;+pnum}
\_doc -----------------------------
The \`\moddef` `\<modifier> {<data>}` simply speaking does
@@ -359,7 +363,7 @@
\_doc -----------------------------
The \`\setfontcolor` and \`\setletterspace` are macros based on the
special font features provided by \LuaTeX/ (and by \XeTeX/ too but it is not
- our business). The \`\setwordspace` recalulates the `\fontdimen2,3,4`
+ our business). The \`\setwordspace` recalculates the `\fontdimen2,3,4`
of the font using the \`\setwsp` macro which is used by the
\^`\_doresizeunifont` macro. It activates a dummy font feature `+Ws` too in
order the font is reloded by the `\font` primitive (with independent
@@ -381,12 +385,14 @@
}
\_def \_setwordspace #1{%
\_if^#1^\_def\_setwsp##1{}\_removefeature{+Ws}%
- \_else \_def\_setwsp{\_setwspA{#1}}\_setff{+Ws}\_fi
+ \_else \_def\_setwsp{\_setwspA#1/}\_setff{+Ws}\_fi
\_reloading
}
\_def\_setwsp #1{}
-\_def\_setwspA #1#2{\_fontdimen2#2=#1\_fontdimen2#2%
- \_fontdimen3#2=#1\_fontdimen3#2\_fontdimen4#2=#1\_fontdimen4#2}
+\_def\_setwspA #1{\_ifx/#1\_ea\_setwspB \_else\_afterfi{\_setwspC#1}\_fi}
+\_def\_setwspB #1/#2/#3/#4{\_fontdimen2#4=#1\_fontdimen2#4%
+ \_fontdimen3#4=#2\_fontdimen3#4\_fontdimen4#4=#3\_fontdimen4#4}
+\_def\_setwspC #1/{\_setwspB #1/#1/#1/}
\_def\_calculatefontcolor#1{\_trycs{_fc:#1}{#1}} % you can define more smart macro ...
\_sdef{_fc:red}{FF0000FF} \_sdef{_fc:green}{00FF00FF} \_sdef{_fc:blue}{0000FFFF}
@@ -774,19 +780,23 @@ empty parameter `<number>` means no letter spacing which is the default.
\^`\setwordspace` `{<scaling>}` scales the default interword space (defined in the
font) and its stretching and shrinking parameters by given `<scaling>`
factor. For example `\setwordspace{2.5}` multiplies interword space by 2.5.
+\^`\setwordspace` can use different multiplication factors if its parameter is in the
+format `{/<default>/<stretching>/<shrinking>}`. For example,
+`\setwordspace{/1/2.5/1}` enlarges only stretching 2.5~times.
-If you need another font transformations, you can use `\setff`
-with following font features provided by Lua\TeX/:
+You can use `\setff` with other font features provided by Lua\TeX/ and `luaotfload` package
+(see documentation of `loaotfload` package for more information):
\begtt
-\setff{embolden=1.5}\rm % font is bolder because outline has nonzero width
-\setff{slant=0.2}\rm % font is slanted by a linear transformation
-\setff{extend=1.2}\rm % font is extended by a linear transformation.
-\setff{colr=yes}\rm % if the font includes colored characters, use colors
-\setff{upper}\rm % to uppercase (lower=lowecase) conversion at font level
+\setff{embolden=1.5}\rm % font is bolder because outline has nonzero width
+\setff{slant=0.2}\rm % font is slanted by a linear transformation
+\setff{extend=1.2}\rm % font is extended by a linear transformation.
+\setff{colr=yes}\rm % if the font includes colored characters, use colors
+\setff{upper}\rm % to uppercase (lower=lowecase) conversion at font level
+\setff{fallback=name}\rm % use fonts from a list given by name if missing chars
\endtt
-Use font transformations mentioned above and \^`\setletterspace`,
+Use font transformations `embolden`, `slant`, `extend` and \^`\setletterspace`,
\^`\setwordspace` with care. The best setting of these values is the default
setting in every font, of course. If you really need to set a different
letter spacing then it is strongly recommended to add `\setff{-liga}`
@@ -838,6 +848,8 @@ Luaotfload documentation for more information.
\endinput
+2021-04-22 \_ffonum introduced
+2021-04-19 \setwordspace: parameter format {/A/B/C} implemented.
2021-02-25 \_ttunifont introduced
2021-01-27 lua hack (print function) removed because luaotfload 3.17 removes bug.
2020-12-12 \_modlist added, doc improved