[NTG-context] Oddity: \buildtextaccent shifts glyph right

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Sun Sep 6 18:20:22 CEST 2015


On 06.09.2015 17:27, Rik wrote:
> It seems that \buildtextaccent\textacute q (or \buildtextaccent´q) moves
> the q to the right within the character’s bounding box. The following
> example (and attached resulting pdf) demonstrates this. Lines 1 and 2
> show the string with and without the \buildtextaccent, and lines 4 and 6
> repeat that in italic.  The strings are the same width, but the q is
> moved right. Lines 3 and 6 show a manual kerning of the q to improve
> appearance.

\buildtextaccent has to take some heuristics about horizontal and 
vertical placement and is sometimes wrong about it. Since your case is 
somewhat special, I would define a macro for the que symbol and adjust 
the boxes manually - but then, you'll have to adapt it to italic and 
upright (and bold) and different font sizes. Depends on how important 
typographical beauty is to you - either a medium-quality solution for 
all cases or better quality and manual fiddling... Something like

\definefontfamily [test] [serif] [ebgaramond]

\setupbodyfont [test,12pt]

\define\que%
   {\bgroup
    \setbox0\hbox{q}%
    \setbox2\hbox to \wd0{\kern0.3em\switchtobodyfont[6pt] ʒ}%
    \setbox4\hbox to \wd0{\kern0.1em\textacute}%
    \hbox to \wd0 \bgroup
      \hss\copy0\hss
      \hskip-\wd0
      \raise-0.45ex\copy2
      \hskip-\wd0
      \raise0.1ex\copy4
     \egroup
   \egroup\autoinsertnextspace}

\starttext

{\it Dicit\que mihi}

\stoptext

(btw, the example you sent uses Latin Modern).

Thomas


More information about the ntg-context mailing list