NB. I guess the question has a little dependency on Language (Bengali). I would try to explain every font in transliterated format.
I like to use a character a below/above another character b. In my use-case a is either a - (hyphen) or । (stop character in Bengali). So for an example word "কুহুকেকা" (transliteration: "KuHuKeKa")
(please note the horizontal line on the top is continuous through each of the four (composite) characters); if I want to a - below the third character কে (Ke) Or add a । above the second character হু ('Hu') of the word,
the horizontal line is not remaining continuous at all - ideally it should look just as the first image but with the later modification.
First I implemented in classy way with amsmath package
\newcommand{\abelowb}[1]{$\underset{\hbox{\text{-}}}{\text{#1}}$}
\newcommand{\aoverb}[1]{$\overset{\raise0em\hbox{\text{#1}}}{\text{।}}$}
After a close observation I realised this problem arises only when ে ৈ ো and ৌ vowel modifiers (having ে common in appearance), are adjacent or in the b eg. মাতৃদেবো (MaTriDebo)
.
Later I suspected the switch in mathmode and textmode may creating this disturbance. So I tried to handcraft the commands like the following:
\newcommand{\myabelowb}[1]{\sbox1{-}\sbox0{#1}#1\raisebox{\dimexpr-
0.5\baselineskip\relax}{\kern\dimexpr-0.5\wd0-0.5\wd1\relax-}\kern\dimexpr0.5\wd0-
0.5\wd1\relax}
\newcommand{\myaoverb}[1]{\sbox1{।}\sbox0{#1}#1\raisebox{\dimexpr0.6\baselineskip\relax}
{\kern\dimexpr-0.5\wd0-0.5\wd1\relax।}\kern\dimexpr0.5\wd0-0.5\wd1\relax}
With these I could fix some issue partially:
\myaoverbis giving the same problem
using command কু\myaoverb{।}{হু}কেকা[Case 1]\myabelowbis working for this word
কুহু\myabelowb{কে}কা[Case 2a], but not here
with command কু\myabelowb{হু}কেকা[Case 2b]amsmathis maintaining a distance frombtoaby some proportional way. My handcrafted commands cannot do that, eg.
What I Observed:
- If there were a concept of XeLaTeX cursor; once the cursor finds ে ৈ ো or ৌ -- under normal cases, it adds extra joining horizontal line to the left of this so that continuity preserves. Otherwise, once some
acomes around ে ৈ ো or ৌ XeLaTeX forgets to go back to the last observed valid character - Case 1 or Case 2b - so that it can glue the horizontal line.
What I want:
I want to have some commands that can alley by the problem of discontinuous horizontal line and also can maintain proportional distance from b.
An MWE:
\documentclass{article}
\usepackage{fontspec,amsmath}
\usepackage{polyglossia}
\setdefaultlanguage[numerals=Bengali,changecounternumbering=true]{bengali}
\setmainfont[Script=Bengali]{Noto Serif Bengali}
\newfontfamily\latinfont[Script=Latin]{Noto Serif}
\setotherlanguages{latin}
\newcommand{\abelowb}[1]{$\underset{\hbox{\text{-}}}{\text{#1}}$}
\newcommand{\aoverb}[1]{$\overset{\raise0em\hbox{\text{#1}}}{\text{।}}$}
\newcommand{\myabelowb}[1]{\sbox1{-}\sbox0{#1}#1\raisebox{\dimexpr-0.5\baselineskip\relax}{\kern\dimexpr-0.5\wd0-0.5\wd1\relax-}\kern\dimexpr0.5\wd0-0.5\wd1\relax}
\newcommand{\myaoverb}[1]{\sbox1{।}\sbox0{#1}#1\raisebox{\dimexpr0.6\baselineskip\relax}{\kern\dimexpr-0.5\wd0-0.5\wd1\relax।}\kern\dimexpr0.5\wd0-0.5\wd1\relax}
\begin{document}
কুহু\abelowb{কে}কা\
কু\aoverb{।}{হু}কেকা\
কুহু\myabelowb{কে}কা\
কু\myaoverb{।}{হু}কেকা\
কু\myabelowb{হু}কেকা
\noindent
\abelowb{কু} \begin{latin} $\longleftarrow$ using \verb|\abelowb{}| \end{latin}
\myabelowb{কু} \begin{latin} $\longleftarrow$ using \verb|\myabelowb{}| \end{latin}
\end{document}






\latinfontto set the font for all Western European languages), you appear to be using English as your secondary language, not Latin. If you\setotherlanguageto English, you’ll get the correct hyphenation patterns. – Davislor May 16 '23 at 16:47albatross 0x0951to get a complete list of all the fonts on your system that support this combining accent. Many fonts that you can download also have a preview form that you can use to test its support for and placement of the tone marks. I unfortunately cannot help you find or make new fonts. – Davislor May 16 '23 at 20:02albatross. – Debanjan Dutta May 17 '23 at 04:04