0

This time I'm working on the bilingual edition of the First Grammatical Treatise. I chose the Brill font which is almost perfect -- by itself and for my goals -- except that it is missing a few necessary glyphs, most frequent of which is the accent that looks like dieresis with acute instead of the rightmost dot. I can emulate it with manually shifted dot and acute accents as in the attached image, but I wonder if there is some clever way to do it making use of the original glyphs' anchors?

manually composed accent example

  • 4
    Please -- as usual here -- show us some short compilable TeX code resulting in your issue! – Mensch Mar 18 '24 at 14:55
  • My issue is a non-standard accent missing in the font and I don't know how to emulate it correctly. The desired shape is as on the attached image. Are you interested in my workaround to obtain it? – Vadim Radionov Mar 18 '24 at 14:59
  • There are several questions on the site about combining accents: https://tex.stackexchange.com/questions/310930/diacritcs-problem-in-text-mode-combining-accent, https://tex.stackexchange.com/questions/595357/adapting-double-math-mode-accents-for-different-math-styles – Steven B. Segletes Mar 18 '24 at 15:03
  • @StevenB.Segletes Thank you for pointing me to these articles. AFAICS, they don't actually fetch the anchor data of the glyph, and with italic font the rough left-center-right alignment is suboptimal. If it is impossible to use ghyphs' anchors, I'll switch to the suggested approach – Vadim Radionov Mar 18 '24 at 15:15
  • 1
    The question is clear, without a MWE (which would not be usedful). I know that lualatex can fetch side bearings (it has been answered on this site). Maybe delete this question, and ask a new one, "Can luatex read glyph anchor points in a font"? That might attract attention from someone who can definitely answer. Also add fontspec tag. – rallg Mar 18 '24 at 16:20

1 Answers1

4

Does that accent exist in Unicode? I don't think so.

\documentclass{article}
\usepackage{fontspec}

\setmainfont{Brill}

\newcommand{\dotacute}[1]{{% \leavevmode \vbox{\offinterlineskip \dimen0=\fpeval{(\the\fontdimen1\font)/(1pt)}\expanded{\fontcharwd\font`\checki{#1}}% \ialign{\hfil##\hfil\cr \hskip0.5\dimen0 \clap{.{}}\kern0.15em\clap{'{}}\cr \noalign{\vskip-1ex} \checki{#1}\cr }% }% }} \newcommand{\checki}[1]{\ifx#1iı\else#1\fi}

\begin{document}

ramr r\dotacute{a}mr r\dotacute{i}mr R\dotacute{A}MR u\dotacute{ǫ}n

\textit{ramr r\dotacute{a}mr r\dotacute{i}mr R\dotacute{A}MR u\dotacute{ǫ}n}

\end{document}

enter image description here

egreg
  • 1,121,712
  • Nice. Just for clarity, your answer does address the question (how to emulate the accents), but does not involve extracting the anchor points. Yes? Ineeed, knowing the anchor points might not be enough, without additional font feature that specifies what anchors in combination with others. – rallg Mar 18 '24 at 19:49
  • @egreg Thank you, Enrico, for this macro -- I'll adopt it, adding some check for kerning with adjacent letters. 20 years ago I'd have tried to write some virtual font based on the font in use to shift and combine the accents (was it possible? I can't remember exactly). Do you know if it is possible with opentype font like Brill? – Vadim Radionov Mar 18 '24 at 20:05
  • This accent is not Unicode, but some MUFI fonts have it, eg Junicode and Palemonas – Vadim Radionov Mar 18 '24 at 20:08
  • But maybe I'm wrong and this is just a way to arrange two separate accents: https://mufi.info/q.php?p=mufi/chars/unichar/58568 – Vadim Radionov Mar 18 '24 at 23:04