ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: C with macron
Date: Wed, 24 Aug 2022 21:07:25 +0200	[thread overview]
Message-ID: <bec6c503-c18b-beda-2d0e-d880bda5f17e@freedom.nl> (raw)
In-Reply-To: <ba058a61-bcf1-8710-ae04-fa578359a268@gmx.es>

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

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
-----------------------------------------------------------------

[-- Attachment #2: m-gimmicks.mkxl --]
[-- Type: text/plain, Size: 1708 bytes --]

%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

[-- Attachment #3: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2022-08-24 19:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  0:23 Thangalin via ntg-context
2022-08-24  6:47 ` Mikael Sundqvist via ntg-context
2022-08-24  7:35   ` Hans Hagen via ntg-context
2022-08-24  7:49     ` Thangalin via ntg-context
2022-08-24  8:01       ` Thangalin via ntg-context
2022-08-24  8:30         ` Hans Hagen via ntg-context
2022-08-24 15:42 ` Pablo Rodriguez via ntg-context
2022-08-24 16:11   ` Thangalin via ntg-context
2022-08-24 18:45     ` Pablo Rodriguez via ntg-context
2022-08-24 19:07       ` Hans Hagen via ntg-context [this message]
2022-08-25  1:11         ` Thangalin via ntg-context
2022-08-25 17:00         ` Pablo Rodriguez via ntg-context
2022-08-25 17:04           ` Hans Hagen via ntg-context
2022-08-25 18:01             ` Pablo Rodriguez via ntg-context
2022-08-25 18:17               ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bec6c503-c18b-beda-2d0e-d880bda5f17e@freedom.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@freedom.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).