[NTG-context] C with macron
Hans Hagen
j.hagen at freedom.nl
Wed Aug 24 21:07:25 CEST 2022
On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote:
> On 8/24/22 18:11, Thangalin via ntg-context wrote:
>> Another nice solution, Pablo, thank you.
>>
>> The macron is shifted a little too far to the left
>
> I don’t know how ConTeXt handles it internally, but placement to main
> character differs with each letter:
>
> \starttext
> \doloopoverlist{\tf,\ss,\tt}
> {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc}
> {\bgroup\recursestring\dorecurse{26}
> {\character{\recurselevel}̱ }\par}\egroup}
> \stoptext
just run the attached
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
-------------- next part --------------
%D \module
%D [ file=m-gimmicks,
%D version=2022.07.25
%D title=\CONTEXT\ Extra Modules,
%D subtitle=Whatever comes up,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\def\MacScale {.7}%
\def\MacRule {.05}%
\def\MacDistance {.05}%
\def\MacKern {0}%
\protected\def\Mac
{\dontleavehmode
\begingroup
\scratchwidth \fontcharwd\font`M\relax
\scratchdistance\MacScale\fontcharwd\font`c\relax
\scratchoffset \dimexpr\fontcharht\font`M -\MacScale\fontcharht\font`c\relax
\scratchdepth \MacRule\exheight
\kern\scratchwidth
\vrule
width \scratchdistance
height \dimexpr \scratchoffset- \scratchdepth-\MacDistance\exheight\relax
depth \dimexpr-\scratchoffset+2\scratchdepth+\MacDistance\exheight\relax
\relax
\kern-\dimexpr\scratchwidth+\scratchdistance\relax
M%
\glyphscale\numexpr\numericscale\MacScale*\glyphyscale/\plusthousand\relax
\glyph
yoffset \scratchoffset `c
\kern\MacKern\emwidth
\endgroup}
\continueifinputfile{m-gimmicks.mkxl}
\setupbodyfont[pagella]
\startTEXpage [offset=1dk]
\def\Test#1{%
\begingroup
#1%
\dostepwiserecurse{5}{8}{1}{
\def\MacScale{.##1}%
\Mac Anulty
\par
}
\endgroup
}
\Test\tf
\Test\bf
\Test\it
\Test\sl
\Test\bfb
\def\MacScale{.6}
\def\MacKern {-.1}
\Mac Anulty
\stopTEXpage
More information about the ntg-context
mailing list