Re: Vowels placement in placeinitial and placement of letter with starthanging

Hans Hagen via ntg-context <[email protected]> Wed, 3 Jun 2026 11:56:51 +0200
Newsgroups gmane.comp.tex.context
Message-ID <[email protected]>
On 6/3/2026 12:52 AM, Aryeh Zapinsky wrote:
> Hi,
> 
> I've noticed that the vowel mark is not centered under letter being used 
> with the \placeinitial command. I'd expect the vowel (the horizontal 
> line) to be centered under the letter (the character that looks like an 
> "n").
> 
> Additionally, when I tried another approach to do a similar thing and 
> used \starthanging, the letter appears higher and more to the right than 
> I expected. I expected the top of the letter to be positioned roughly as 
> high as the text on the rest of the line, but it appears higher.
> 
> _Questions:_
> 1. What is the change that would make the \placeinitial combine the 
> letter and the vowel?
> 2. Is there something that I should be doing to center the graphic when 
> using \starthanging? Or is there something that needs to be changed here 
> as well?
> 3. Is there a better way to set up the initial character? (I was 
> thinking I would use metapost to make a graphic eventually.)
> 
> _Minimal example:_
> \definefontfeature[minimal][default][
>      script=hebr
> ]
> 
> \starttypescript [serif] [hebrew]
>    \definefontsynonym [Serif]             [file:/workspaces/ 
> context_lmtx/context_2/build_from_cmake_2/context_from_scratch/tex/ 
> texmf-fonts/firago/FiraGO-Regular.ttf][features=minimal]
> \stoptypescript
> 
> \definetypeface [hebrew]  [rm]  [serif] [hebrew]
> \definetypeface [hebrew]  [ss]  [serif] [hebrew]
> 
> \setupbodyfont[hebrew, 20pt]
> \setupalign[r2l]
> \setupdirections[bidi=global, method=unicode]
> 
> \setupinitial[n=2,m=2]
> 
> \starttext
> 
> \placeinitial
> חַי ה' וּבָרוּךְ צוּרִי
> בַּה' תִּתְהַלֵּל נַפְשִׁי
> כִּי ה' יָאִיר נֵרִי
> בְּהִלּוֹ נֵרוֹ עֲלֵי רֹאשִׁי
> בַּה' תִּתְהַלֵּל נַפְשִׁי
> כִּי ה' יָאִיר נֵרִי
> בְּהִלּוֹ נֵרוֹ עֲלֵי רֹאשִׁי
> חַי ה' וּבָרוּךְ צוּרִי
> בַּה' תִּתְהַלֵּל נַפְשִׁי
> כִּי ה' יָאִיר נֵרִי
> בְּהִלּוֹ נֵרוֹ עֲלֵי רֹאשִׁי
> 
> \blank
> 
> \def\hangingCharacter#1{%
> \setMPtext{hebrew_letter}{#1}
> \startuseMPgraphic{letter_w}
>      picture q;
>      q := outlinetext(\MPstring{hebrew_letter}) scaled 3;
>      for i within q:
>          j := j + 1;
>          draw pathpart i withpen pencircle scaled 2;
>      endfor;
> \stopuseMPgraphic
> \useMPgraphic{letter_w}
> }
> 
> \starthanging[left]{\hangingCharacter{חַ}}
> י ה' וּבָרוּךְ צוּרִי
> בַּה' תִּתְהַלֵּל נַפְשִׁי
> כִּי ה' יָאִיר נֵרִי
> בְּהִלּוֹ נֵרוֹ עֲלֵי רֹאשִׁי
> \stophanging
> 
> \stoptext
> 
> _Context Version:_
> ConTeXt  ver: 2025.11.24 17:55 LMTX  fmt: 2025.12.31  int: english/english__
> 
> Any help would be appreciated.

I'll send you a file to test. Anyway, bets do this:

\definefontfeature
  [minimal]
  [hebrew]

because you get better anchoring. Also, define a bold font:

\starttypescript [serif] [hebrew]
   \definefontsynonym [Serif]    [FiraGO-Regular.otf][features=minimal]
   \definefontsynonym [SerifBold][FiraGO-Medium.otf][features=minimal]
\stoptypescript

Or adapt the font=... accordingly.

\definetypeface [hebrew]  [rm]  [serif] [hebrew]
\definetypeface [hebrew]  [ss]  [serif] [hebrew]

\setupbodyfont[hebrew, 20pt]
\setupalign[r2l]
\setupdirections[bidi=global, method=unicode]

The patch doesn't need the m= setup.

\setupinitial[n=2]

\starttext

\placeinitial ....

\stoptext

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________