2

In the TiKz-Manual it says:

... that LaTeX has two commands called \thinlines and \thicklines and that \thinlines gives the line width of “normal” lines, more precisely, of the thickness that, say, the stem of a letter like “T” or “i” has.

Is there a similar command in ConTeXt to get the stem width of i,T of a font? I would like to have a consistent line width in my MetaPost drawings and the used font.

1 Answer 1

3

Note that LaTeX does not use the current width of the stem of T; rather it uses \fontdimen8 of line10 font which is equal to the width of the stem of T for computer modern fonts. You can copy the LaTeX definition in ConTeXt

\font\tenln  line10   
\font\tenlnw linew10

\newdimen\wholewidth
\newdimen\halfwidth

\def\thinlines
  {\wholewidth\fontdimen8\tenln 
   \halfwidth .5\wholewidth}

\def\thicklines
  {\wholewidth\fontdimen8\tenlnw 
   \halfwidth .5\wholewidth}


\startbuffer[circle]
  draw fullcircle xyscaled (1cm,1cm) withpen pencircle scaled \the\wholewidth
\stopbuffer

\starttext
Thinlines: \thinlines
\processMPbuffer[circle]

Thicklines: \thicklines
\processMPbuffer[circle]

\stoptext

which gives

enter image description here

Note For some reason, the above code does not work with MkIV. I don't know why that is the case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .