diff options
Diffstat (limited to 'fmt/font.h')
-rw-r--r-- | fmt/font.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -8,7 +8,8 @@ \expandafter\getfontsizE\fontname##2#1\relax{##1}% }% \def\getfontsizE##1#1##2\relax##3{% - \ifx*##2*% Loaded at designsize + {\def\tmp{##2}\expandafter}% + \ifx\tmp\empty % empty #2 = Loaded at designsize \begingroup \font\tmpfont"##1" scaled 2000 \getfontsize\dimen0=\tmpfont @@ -21,8 +22,8 @@ \fi }% \def\getfontsiZE##1##2#1{##1=##2}% Strip " at " - \def\getfontsiZe##1\relax##2{##2=##1} - } + \def\getfontsiZe##1\relax##2{##2=##1}% + }% \expandafter\expandafter\expandafter \endgroup \expandafter\x\specialAt % From StackOverflow @@ -31,8 +32,7 @@ \global\let\f@nt\font -\gdef\spacing{ - \afterassignment\adjs \thespacing} +\gdef\spacing{\afterassignment\adjs \thespacing} \gdef\adjs{%adjust spacing \baselineskip=\size \multiply\baselineskip by \thespacing \divide\baselineskip by 100\relax} @@ -44,7 +44,9 @@ } \gdef\xfont{ \expandafter\getfontsize\expandafter\dimen0\expandafter=\realname - \expandafter\expandafter\expandafter\def - \expandafter\orig\expandafter{\realname\size\dimen0\adjs} + \setbox0=\hbox{\vphantom(}% + \dimen1=\ht0\advance\dimen1 by 1.5pt% + \expandafter\edef\orig{\realname\size\the\dimen0\setbox\strutbox=\hbox{\vrule + height \the\dimen1 depth \the\dp0 width 0pt}\adjs} } } |