[NTG-context] efficiently scaling fonts

Pablo Rodriguez oinos at gmx.es
Thu Dec 24 16:00:37 CET 2020


On 12/24/20 12:20 PM, Hans Hagen wrote:
> Hi,
>
> I uploaded a new lmtx ... in a previous mail i mentioned font scaling
> and I made that two dimensional:

Hi Hans,

many thanks for the LMTX new release.

I can only get it working after removing the extra \starttext and adding
\stopbuffer and \getbuffer, such as in:

  \setuplayout[topspace=1cm,header=1cm]
  \setuplayout[middle]
  \setupbodyfont[pagella,10pt]
  \setupalign[verytolerant,stretch]
  \setupwhitespace[big]

  \starttext

  \startbuffer
  \definescaledfont[bfe][xscale=2000,yscale=6000,style=bf]
  \setuphead[chapter][style=\bfe]

  \dostepwiserecurse {10} {2020} {10} {
       \title{Here we go #1!}
       \start
       \glyphxscale#1\relax
       \glyphyscale#1\relax
       \setupinterlinespace
       \samplefile{ward}%
       \start
       \bf
       \samplefile{ward}%
       \glyphxscale\numexpr(#1*2)/3\relax
       \glyphyscale#1\relax
       \samplefile{ward}%
       \par
       \stop
       \def\TEST{y = \sqrt{x^2 + 1}^3}%
       \dontleavehmode
       \ruledhbox{\glyphxscale #1                 \glyphyscale #1
           $\left{\TEST\right}$}
       \ruledhbox{\glyphxscale #1                 \glyphyscale
  \numexpr#1*3\relax $\left{\TEST\right}$}
       \ruledhbox{\glyphxscale \numexpr#1/2\relax \glyphyscale
  \numexpr#1*2\relax $\left{\TEST\right}$}
       \par
       \stop
       \page
  }
  \stopbuffer

  \getbuffer
  \stoptext

Many thanks for your excellent work.

Happy holidays to you and to all list members,

Pablo
--
http://www.ousia.tk


More information about the ntg-context mailing list