[XeTeX] XeLaTeX compilation issues with complex font
B
b at gmail.com
Mon Aug 12 05:32:44 CEST 2019
To whom it may concern,
I am having trouble getting my code to compile using the following three
commands in unison:
\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
The full explanation can be found in the link below, or copied and pasted
below the link. Thank you for any assistance you can provide.
https://tex.stackexchange.com/questions/503498/trouble-with-stacked-consonants-burmese-script
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.
[image: Stacked consonants not working]
<https://i.stack.imgur.com/IgI2s.png>
[image: More incorrect rendering] <https://i.stack.imgur.com/KXT3p.png>
[image: Last example of incorrect rendering]
<https://i.stack.imgur.com/fLZ5R.png>
[image: Example of correctly stacked consonants]
<https://i.stack.imgur.com/OEba4.png>
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}
Thank you,
B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20190812/8a81f254/attachment-0001.html>
More information about the XeTeX
mailing list