diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-ini.mkii')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-ini.mkii | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-ini.mkii b/Master/texmf-dist/tex/context/base/font-ini.mkii new file mode 100644 index 00000000000..f3f40160b09 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/font-ini.mkii @@ -0,0 +1,57 @@ +%D \module +%D [ file=font-ini, +%D version=2007.01.10, +%D title=\CONTEXT\ Font Macros, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +% not that efficient but inheritance is seldom used (untested) + +\def\mkdefinefontfeature#1#2#3% + {\doifassignmentelse{#2} + {\setevalue{\??fa#1}{#2}} + {\let\!!stringa\empty + \def\mkdodefinefontfeature##1{\edef\!!stringa{\ifx\!!stringa\empty\else\!!stringa,\fi##1}}% + \processcommalist[#2]\mkdodefinefontfeature + \setevalue{\??fa#1}{\ifx\!!stringa\empty\else\!!stringa,\fi#3}}} + +\def\updatefontparameters + {\edef\@@fontencoding{\truefontdata\fontfile \s!encoding}% + \edef\@@fontmapping {\truefontdata\fontfile \s!mapping }% + \edef\@@fonthandling{\truefontdata\somefontname\s!handling}% + \edef\@@fontfeatures{\truefontdata\fontfile \s!features}% + \edef\@@fontskewchar{\truefontdata\fontfile \s!skewchar}} + +\def\setfontcharacteristics + {\updatefontparameters % redundant, will go away, faster too + \fastenableencoding + {\ifx\@@fontencoding\empty + \s!default \else \@@fontencoding + \fi}% + \fastenablemapping + {\ifx\@@fontmapping\empty + \ifx\@@fontencoding\empty + \s!default \else \@@fontencoding + \fi + \else + \@@fontmapping + \fi}% + \fastenablehandling + {\ifx\@@fonthandling\empty + \s!default \else \@@fonthandling + \fi}% + {\lastfontidentifier}% + \the\everyfont + \synchronizepatternswithfont} + +\ifx\synchronizepatternswithfont\undefined \def\synchronizepatternswithfont{\synchronizepatterns} \fi + +\protect \endinput |