3

I'm having trouble getting certain stacked consonants to render properly in the output - they show up in the Texworks editor just fine, MS Word can show them, along with any other engine capable of selecting a font that I've found. As you can see from the below image, the problem is not ubiquitous. To the left, the two ဂ characters, which should be rendered as ဂ္ဂ, are instead placed next to each other, yet the two တ characters stacked correctly. There are two more examples of improper rendering, and then I have also included a correct example to demonstrate that TeX is indeed capable of rendering stacked consonants correctly at times.

I've tried numerous different fonts, though that has failed to resolve the issue. I would argue that it could be the rendering engine (XeLaTeX), though that seems unlikely to me as well, as there are conflicting cases where the same set of characters are rendered correctly in one instance and incorrectly in another, despite existing in the same document. I have also tried copying and pasting working characters to the problem areas with no luck.

Removing the XeTeXlinebreaklocale line from the code fixes the stacking issue, but makes every line run into the margins and, unfortunately, is not an acceptable solution for what will be a published book. I will continue experimenting with this and see if I can't figure something out related to that line of code, though.

Stacked consonants not working

More incorrect rendering

Last example of incorrect rendering

Example of correctly stacked consonants

Lastly, some code to reference:

\documentclass{book}

%packages
\usepackage{fontspec} %To use non-standard fonts


%style
\XeTeXlinebreaklocale "my"  %Myanmar line and character breaks
\XeTeXlinebreakskip = 0pt plus 2.5pt minus 1pt %2.5pt because at 2 and below still goes past margins.
\setmainfont[Script=Myanmar]{Padauk Book}

\begin{document}

Filler text အဂ္ဂပေမေတ္တာ ဗတ္တိဇံ သင်္ဂြုဟ် အတ္ထုပ္ပတ္တိ

\end{document}

Update: Following another idea that worked for Khmer ligatures, I added \XeTeXinterwordspaceshaping=2, though it then tells me "Process crashed." Testing with the below example for a simplified work space, I found that eliminating any one of the three XeTeX commands will allow the engine to compile. However, all three are needed to get the ligatures to display properly and the text to fit within the margins. On the bright side, the below example shows that it's not a conflict with another package, but rather an issue in interactions between these commands.

\documentclass{article}
\usepackage{fontspec} %To use non-standard fonts
\XeTeXlinebreaklocale "my"  %Myanmar line and character breaks
\XeTeXlinebreakskip = 0pt plus 2pt minus 1pt %2.5pt because at 2 and below still goes past margins.
\XeTeXinterwordspaceshaping=2
\setmainfont[Script=Myanmar]{Padauk Book}
\begin{document}

တစ်နှစ်သုံးဟဲလိုကမ္ဘာကြီး

    အပြစ်ဖြေခြင်းသည် ဒေသနာတစ်ခုဖြစ်ပါသည်သို့သော် အပြစ်ဖြေခြင်းပုံစံသည် ပုံသေနည်းတစ်ခုတည်းမဟုတ်ပါ။ 
ပုစ္ဆာတစ်ပုဒ်ကိုဖြေရှင်းသည်ထက် ထိုအပြစ်ဖြေခြင်းကို ပို၍ခံစားရမည်၊ စိစစ်မှုမဟုတ်၊ နှလုံးသွင်းရပါမည်။ 
ယေရှူခရစ်တော်၏အပြစ်ဖြေခြင်းသည် လောကနှင့် စကြဝဠာများ၏သိမ်မွေ့နူးညံ့ခြင်း၊ မျက်စိပွင့်စေခြင်း၊ အဂ္ဂပေမေတ္တာ ဒေသနာတစ်ခုဖြစ်သောကြောင့် ထိုဒေသနာကိုရှာဖွေရန် မိမိ၏လုပ်နိုင်စွမ်း အကုန်ပါရမည်။
\end{document}

The error coming out of this test document is as follows: ("C:\Users--\AppData\Local\Programs\MiKTeX 2.9\tex/latex/fontspec\fontspec- xetex.sty"
("C:\Users--\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\fontenc.sty"
("C:\Users--\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\tuenc.def"))
("C:\Users--\AppData\Local\Programs\MiKTeX 2.9\tex/latex/fontspec\fontspec. cfg"))) (test.aux)

This seems to come down to a problem interacting with fontspec, regardless of what font I use.

7
  • 2
    I can't read Burmese, but if I remove the \XeTeXlinebreaklocale line, I get a more sensible output (without the dotted circles).
    – egreg
    Aug 9, 2019 at 10:14
  • 1
    If I compile the example with TeX Live 2014, it works; not with any later version.
    – egreg
    Aug 9, 2019 at 10:21
  • Just tested this. It does, indeed, fix the stacked character problem from what I could see, but also caused all the lines to run into the margins. Edit: Interesting comment about using Tex Live 2014, I'm curious what they changed since then that is causing the difference
    – Bryce M
    Aug 9, 2019 at 10:22
  • 1
    See here for some background: tug.org/pipermail/xetex/2018-April/027325.html (I don't have the impression that the suggested \XeTeXinterwordspaceshaping=2 works very well.) Aug 9, 2019 at 16:49
  • 1
    hm, yes there is something xetex really doesn't like. It fails also in texlive. I know nothing about your script, but I suspect that you will have to insert possible break points manually instead of relying on the linebreak locale. Aug 12, 2019 at 13:32

0

You must log in to answer this question.

Browse other questions tagged .