Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.