I switched to lualatex for coloring part of Arabic words easily with arabluatex and xcolor. With xelatex I'd no problem with Bangla.

Here's the latex script:

\usepackage{arabluatex, fontspec, xcolor}
\newfontfamily\arabicfont[Script = Arabic]{Al Qalam Quran Majeed Web} 

\newcommand{\textarabic}[1]{\bgroup\textdir TRT\arabicfont #1\egroup}     % Arabic inside LTR
\newcommand{\n}[1]{\bgroup\textdir TLT #1\egroup}     % for digits inside Arabic text
\newcommand{\afootnote}[1]{\footnote{\textarabic{#1}}}     % Arabic footnotes
\newenvironment{Arabic}{\textdir TRT\pardir TRT\arabicfont}{}     % Arabic paragraph



    কণ্যা এখন কি করিবে? \\
    \textarabic{وَ{\r لَ}دٌ}\\
    \textarabic{{\r ٱل}كَلَمُ}\\
    \textarabic{أَبَ{\r كُم}}


and here's the output:

enter image description here

Bangla output in the first line should have been: কণ্যা এখন কি করিবে?

How to fix Bangla in lualatex?

  • Thanks. @UlrikeFischer The glyphs look kind of familiar, I think we had some similar problem in luaotfload before. Do you remember anything about it? – Marcel Krüger May 28 at 15:24
  • 2
    @MarcelKrüger The script is also mentioned here tex.stackexchange.com/questions/454031/…. Imho (as it fails in context too) it is one of the cases why we want harfbuzz in luatex (with mode=harf it works fine). – Ulrike Fischer May 28 at 18:11
  • 1
    no, harfbuzz is a library for all scripts (and harfbuzz is used in xetex where your script works fine). – Ulrike Fischer May 28 at 18:48
  • 2
    well if you are feeling adventurous you could try harftex (which is luatex + harfbuzz). – Ulrike Fischer May 28 at 20:17
  • 1
    harftex isn't in miktex. You would need a texlive and then get the binaries from w32tex.org (and you would need to make a latex format for it, and get github.com/khaledhosny/harf). – Ulrike Fischer May 28 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.