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.
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.
\XeTeXlinebreaklocale
line, I get a more sensible output (without the dotted circles).