[NTG-context] C with macron

Thangalin thangalin at gmail.com
Thu Aug 25 03:11:47 CEST 2022


Here's an attempt with dynamic kerning based on the font, which eliminates
some of the tweaking needed. It's not perfect and, depending on the font, a
little work is needed. For pagella, scholas, termes, and a few other
default fonts, the results are decent.

%\setupbodyfont[pagella]
%\setupbodyfont[scholas]
\setupbodyfont[termes]

\starttext
  \newbox\MacMBox
  \setbox\MacMBox\hbox{M}
  \newbox\MacCBox
  \setbox\MacCBox\hbox{c}
  \newbox\MacKernBox
  \setbox\MacKernBox\hbox{\inframed[offset=\zeropoint, width=fit]{Mc}}

  \def\MacDelta{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}
  \def\MacUWidth{\dimexpr\wd\MacCBox-.75\MacDelta\relax}
  \def\MacRule{\vrule width \MacUWidth height .03em depth \zeropoint \relax}
  \def\MacKern{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}

  \def\Mac{%
    M{%
      \dontleavehmode{\raisebox{\dimexpr\ht\MacMBox-\ht\MacCBox}\hbox{c}}%
      \kern-1.04\MacUWidth
      \MacRule
      \kern.08\MacUWidth
    }%
  }

  \scale[scale=5000]{\Mac Anulty}
  \Mac Anulty
\stoptext

Thanks everyone!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220824/e5a3aa80/attachment-0001.htm>


More information about the ntg-context mailing list