diff options
Diffstat (limited to 'tex/context/base/font-ini.tex')
-rw-r--r-- | tex/context/base/font-ini.tex | 110 |
1 files changed, 61 insertions, 49 deletions
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index c69809dbf..a6acf4c09 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -875,7 +875,7 @@ %D %D We can inhibit this slow||downer with: -\def\textonly{\synchronizemathfontsfalse} +\def\textonly{\synchronizemathfontsfalse} % document this \appendtoks \dosettextfamily\c!tf @@ -993,6 +993,7 @@ \dosetmathfamily\mafam\textface\scriptface\scriptscriptface\c!ma\empty \dosetmathfamily\mbfam\textface\scriptface\scriptscriptface\c!mb\empty \dosetmathfamily\mcfam\textface\scriptface\scriptscriptface\c!mc\empty +% \dosetmathfamily\mdfam\textface\scriptface\scriptscriptface\c!md\empty \dosetmathfamily\nnfam\textface\scriptface\scriptscriptface\c!nn\empty \to \mathstrategies @@ -1097,6 +1098,7 @@ \dosetsymbfamily\mafam\textface\scriptface\scriptscriptface\c!ma \dosetsymbfamily\mbfam\textface\scriptface\scriptscriptface\c!mb \dosetsymbfamily\mcfam\textface\scriptface\scriptscriptface\c!mc +% \dosetsymbfamily\mdfam\textface\scriptface\scriptscriptface\c!md % also ? \to \symbstrategies \def\dosetsymbfamily#1#2#3#4#5% @@ -1272,7 +1274,7 @@ {\afterassignment\do@fs@scaled\scratchcounter} \def\do@fs@scaled#1\relax - {\scaledfont\number\scratchcounter\s!pt + {\scaledfont\number\scratchcounter\points \scaledfont\localrelativefontsize\scaledfont \ifautofontsize\scaledfont\currentfontbodyscale\scaledfont\fi \scratchcounter\scaledfont % \scaledfont is now pretty large @@ -2088,13 +2090,13 @@ \endETEX -\def\bodyfontcsname% +\def\bodyfontcsname {\csname\bodyfontvariable} -\def\bodyfontinterlinespecs% +\def\bodyfontinterlinespecs {\bodyfontvariable{\normalizedbodyfontsize\c!interlinie}} -\def\bodyfontinterlinespace% +\def\bodyfontinterlinespace {\csname\bodyfontinterlinespecs\endcsname} %D We default all parameters to the main bodyfont size (begin @@ -2262,19 +2264,19 @@ \def\checkbodyfont#1#2#3#4% body style alt size / gdef % #4 can be empty {\def\c!!mm{#2}% \ifx\c!!mm\c!mm % prevents \max and alike (re)defs - \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm - \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl + \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm + \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl \else - \unexpanded\setgvalue {#2#4}{\setcurrentfontstylesize {#2}{#4}}% \rma - \unexpanded\setgvalue {#3#4}{\setcurrentfontalternativesize {#3}{#4}}% \sla + \unexpanded\setgvalue {#2#4}{\setcurrentfontstylesize {#2}{#4}}% \rma + \unexpanded\setgvalue {#3#4}{\setcurrentfontalternativesize {#3}{#4}}% \sla \unexpanded\setgvalue {#2#3#4}{\setcurrentfontstylealternativesize{#2}{#3}{#4}}% \rmsla - \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm - \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl - \unexpanded\setgvalue {#2\c!x}{\setcurrentfontxstylealternative {#2}}% \rmx - \unexpanded\setgvalue{#2\c!xx}{\setcurrentfontxxstylealternative {#2}}% \rmxx - \unexpanded\setgvalue {#3\c!x}{\setcurrentfontxalternative {#3}}% \slx - \unexpanded\setgvalue{#3\c!xx}{\setcurrentfontxxalternative {#3}}% \slxx - \unexpanded\setgvalue {#2#3}{\setcurrentfontstylealternative {#2}{#3}}% \rmsl + \unexpanded\setgvalue {#2}{\setcurrentfontstyle {#2}}% \rm + \unexpanded\setgvalue {#3}{\setcurrentfontalternative {#3}}% \sl + \unexpanded\setgvalue {#2\c!x}{\setcurrentfontxstylealternative {#2}}% \rmx + \unexpanded\setgvalue{#2\c!xx}{\setcurrentfontxxstylealternative {#2}}% \rmxx + \unexpanded\setgvalue {#3\c!x}{\setcurrentfontxalternative {#3}}% \slx + \unexpanded\setgvalue{#3\c!xx}{\setcurrentfontxxalternative {#3}}% \slxx + \unexpanded\setgvalue {#2#3}{\setcurrentfontstylealternative {#2}{#3}}% \rmsl \fi} \def\dodefinedefaultbodyfont[#1][#2][#3]% sizes styles identifier @@ -2454,11 +2456,11 @@ \def\normalizebodyfontsize#1\to#2% {\scratchdimen#1\relax - \ifcase\fontdigits\advance\scratchdimen.5\s!pt\fi + \ifcase\fontdigits\advance\scratchdimen.5\points\fi \@EA\@EA\@EA\donormalizedbodyfontsize \@EA\WITHOUTPT\the\scratchdimen00\to#2} -\def\donormalizedbodyfontsize#1.#2#3#4\to#5% +\def\donormalizedbodyfontsize#1.#2#3#4\to#5% \points ? {\edef#5% {#1% \ifcase\fontdigits\or @@ -2666,7 +2668,7 @@ \def\dosetsubstitutefont#1#2% #1 = set/switch state {\scratchdimen#2\relax - \advance\scratchdimen .499\s!pt + \advance\scratchdimen .499\points \dimensiontocount\scratchdimen\scratchcounter \advance\scratchcounter \minusone \ifnum\scratchcounter>\plusthree @@ -3190,8 +3192,19 @@ \scriptfont \mrfam\scriptfont \mffam \scriptscriptfont\mrfam\scriptscriptfont\mffam} -\def\domffam#1% - {\csname\ifundefined{#1\s!fam}\c!nn\else#1\fi\s!fam\endcsname} +\beginTEX + + \def\domffam#1% + {\csname\ifundefined{#1\s!fam}\c!nn\else#1\fi\s!fam\endcsname} + +\endTEX + +\beginETEX \ifcsname + + \def\domffam#1% + {\csname\ifcsname#1\s!fam\endcsname#1\else\c!nn\fi\s!fam\endcsname} + +\endETEX \def\mffam {\domffam\fontalternative} @@ -3322,7 +3335,7 @@ {\setvalue{##1}{\switchtobodyfont[#2]}}% \processcommalist[#1]\docommando} -\def\definebodyfontswitch% +\def\definebodyfontswitch {\dodoubleargument\dodefinebodyfontswitch} %D \macros @@ -3464,7 +3477,7 @@ \setvalue{\@noletter@##1}{#3}}% \processcommalist[#1]\docommando} -\def\definealternativestyle% +\def\definealternativestyle {\dotripleempty\dodefinealternativestyle} \def\definestyle{\definealternativestyle} @@ -3653,11 +3666,13 @@ \def\dodoemphasiscorrection {\setbox\scratchbox\hbox{\next}% - \ifdim\ht\scratchbox<.3ex - \expandafter\endgroup - \else + \ifdim\ht\scratchbox=\zeropoint % probably a space \expandafter\dododoemphasiscorrection - \fi} + \else\ifdim\ht\scratchbox<.3ex + \expandafter\expandafter\expandafter\endgroup + \else + \expandafter\expandafter\expandafter\dododoemphasiscorrection + \fi\fi} \def\dododoemphasiscorrection {\scratchskip\lastskip @@ -3703,17 +3718,10 @@ %D The next emphasis alternatives are for \THANH. They adapt %D their style as good as possible. -\def\emphbf - {\groupedcommand{\bf\def\emphit{\bi}\def\emphsl{\bs}}{}} - -\def\emphit - {\groupedcommand{\it\def\emphbf{\bi}\def\emphsl{\sl}}{}} - -\def\emphsl - {\groupedcommand{\sl\def\emphbf{\bs}\def\emphit{\it}}{}} - -\def\emphtf - {\groupedcommand{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}{}} +\def\emphbf{\groupedcommand{\bf\def\emphit{\bi}\def\emphsl{\bs}}{}} +\def\emphit{\groupedcommand{\it\def\emphbf{\bi}\def\emphsl{\sl}}{}} +\def\emphsl{\groupedcommand{\sl\def\emphbf{\bs}\def\emphit{\it}}{}} +\def\emphtf{\groupedcommand{\tf\def\emphbf{\bf}\def\emphit{\it}\def\emphsl{\sl}}{}} %D \startbuffer %D TEXT {\emphbf text \emphit text \emphtf text \emphsl text} TEXT @@ -3769,7 +3777,7 @@ %D different fonts into a collection (typeface) and %D determining optimal baseline distances. %D -%D \showfontstrip \blank \showminimalbaseline +%D \showfontstrip \blanko \showminimalbaseline \fetchruntimecommand \showfontstrip {\f!fontprefix\s!run} \fetchruntimecommand \testminimalbaseline {\f!fontprefix\s!run} @@ -3820,6 +3828,7 @@ \fetchruntimecommand \showfontstyle {\f!fontprefix\s!run} \fetchruntimecommand \showligature {\f!fontprefix\s!run} \fetchruntimecommand \showligatures {\f!fontprefix\s!run} +\fetchruntimecommand \showcharratio {\f!fontprefix\s!run} %D \macros %D {getglyph, symbolicfont} @@ -4300,15 +4309,18 @@ %D New or old? % tzt proper \define... - -\def\tfmath{\tf\mf\synchronizesymb} -\def\bfmath{\bf\mf\synchronizesymb} -\def\slmath{\sl\mf\synchronizesymb} -\def\itmath{\it\mf\synchronizesymb} -\def\bsmath{\bs\mf\synchronizesymb} -\def\bimath{\bi\mf\synchronizesymb} -\def\scmath{\sc\mf\synchronizesymb} -\def\nnmath{\nn\mf\synchronizesymb} +% +% watch out: \synchronizesymb resets the family so we need a second +% \mf (or maybe \mr): messy and to be sorted out + +\def\tfmath{\tf\mf\synchronizesymb\mf} +\def\bfmath{\bf\mf\synchronizesymb\mf} +\def\slmath{\sl\mf\synchronizesymb\mf} +\def\itmath{\it\mf\synchronizesymb\mf} +\def\bsmath{\bs\mf\synchronizesymb\mf} +\def\bimath{\bi\mf\synchronizesymb\mf} +\def\scmath{\sc\mf\synchronizesymb\mf} +\def\nnmath{\nn\mf\synchronizesymb\mf} \def\textmath {\synchronizesymb} @@ -4364,4 +4376,4 @@ %D %D \def\abortiffontnotfound#1% %D {\doiffontpresentelse{#1}{}{\showmessage{\m!fonts}{10}{\truefontname{#1}}\endinput}} -%D \stoptypen +%D \stoptypen
\ No newline at end of file |