summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/csplain/fonts/cs-heros.tex')
-rw-r--r--Master/texmf-dist/tex/csplain/fonts/cs-heros.tex51
1 files changed, 51 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
index 58e1468e00b..e6a9cdb7841 100644
--- a/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
+++ b/Master/texmf-dist/tex/csplain/fonts/cs-heros.tex
@@ -344,3 +344,54 @@ in \write file. After the data are read from file again, they do exactly
what we need. But if the \modfoo is protected, then \modfoo\it is expanded
into \write file like \modfoo\fam\itfam\tenit and this is bad.
+
+\ffloadhookA,B -- substitutions on demand
+-----------------------------------------
+
+The font loading process can be illustrated by the following pseudocode:
+
+\if \ffvarV=! \ffwarning{string of selected variant}%
+\else
+ \let\ffopptV=\empty
+ % now we can expand \ffnamegen wich represents selected shape
+ \ffloadhookA\iftrue
+ font-name := \ffnamegen
+ \if was declared \ffalias{font-name}{real-name}
+ font-name := real-name
+ \fi
+ \if font-name is declared by \regtfm
+ \if \dgsize is defined
+ dg-size := \dgsize
+ \else
+ dg-size := 10pt
+ \fi
+ \if \sizespec is in the "at<dimen>" form
+ read dg-size from \sizespec
+ \fi
+ select font-name from \regtfm data with given dg-size
+ \fi
+ \ffloadhookB
+ \font \f = font-name \sizespec
+ where \f is \tenrm or \tenbf or \tebit or \tenbi or \ffmodfont
+ \fi
+\fi
+
+The \ffloadhookA and \ffloadhookB are set to empty by default. But you can
+define it for testing of availability of given \ffnamegen (see kp-fonts.tex
+or lmfonts.tex for an example). Note that \ffloadhookA macro from mentioned
+files consumes the following \iftrue and executes the font process only if
+\ffnamegen is validated.
+
+The substitution can be done in \ffloadhookA on demand, for example:
+
+\def\ffloadhookB{%
+ % ... here we know the actual \ffnamegen and we can do:
+ \if... \ffnamegen is not available then
+ \ffalias{\ffnamegen}{something-available}%
+ \fi
+}
+
+The extra font metrix (TS1) can be loaded on demand vis \ffloadhookB,
+see exchars.tex
+
+------------------------------------------------------------------