Issue with Burmese and LuaLaTeX












9















I am working with a project which requires LuaLaTeX (TeX Live 2018) and the Noto Serif Myanmar font. I need a few words of Burmese only. The MWE works well with XeLaTeX. But LuaLaTeX has a problem with the ligatures. Is there any way to get this to work with LuaLaTeX and the used Noto Serif Myanmar font (besides setting them with XeLaTeX and include them as graphics, e.g. with https://ctan.org/pkg/standalone)?



documentclass[landscape]{memoir}

usepackage{fontspec,polyglossia,url}

newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}
newfontfamily{burmeseFamilyDecom}{MyanmarMN}
newcommand{burmeseTest}[1]{
{burmeseFamily{} #1}
hfill
{burmeseFamilyDecom{} #1}}

begin{document}

burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

bigskip
burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


vfill
Might be usefull: url{https://r12a.github.io/pickers/burmese/}
end{document}


The RHS is just for comparison, the LHS is what I really need.



XeLaTeX (correct):
enter image description here



LuaLaTeX (wrong):
enter image description here



The website https://r12a.github.io/pickers/burmese/ might be useful for an analysis of the ligatures. Thanks to ShreevatsaR's comment below, the site https://en.wikipedia.org/wiki/Complex_text_layout might give some relevant information. If you are not familiar with the Noto fonts, you might want to read https://en.wikipedia.org/wiki/Noto_fonts.





Update. Version 2.7b (2019/02/12) of https://ctan.org/pkg/fontspec adds (experimental) support for additional rendering engines such as Harfbuzz or Graphite. I was not able to do a correct set up with those engines, yet, see also the comments on https://tex.stackexchange.com/a/441914/128553 below.










share|improve this question




















  • 5





    At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

    – ShreevatsaR
    May 13 '18 at 22:38











  • @ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

    – CampanIgnis
    May 14 '18 at 21:53













  • About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

    – ShreevatsaR
    Jun 4 '18 at 14:43











  • Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

    – ShreevatsaR
    Jun 4 '18 at 14:51
















9















I am working with a project which requires LuaLaTeX (TeX Live 2018) and the Noto Serif Myanmar font. I need a few words of Burmese only. The MWE works well with XeLaTeX. But LuaLaTeX has a problem with the ligatures. Is there any way to get this to work with LuaLaTeX and the used Noto Serif Myanmar font (besides setting them with XeLaTeX and include them as graphics, e.g. with https://ctan.org/pkg/standalone)?



documentclass[landscape]{memoir}

usepackage{fontspec,polyglossia,url}

newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}
newfontfamily{burmeseFamilyDecom}{MyanmarMN}
newcommand{burmeseTest}[1]{
{burmeseFamily{} #1}
hfill
{burmeseFamilyDecom{} #1}}

begin{document}

burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

bigskip
burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


vfill
Might be usefull: url{https://r12a.github.io/pickers/burmese/}
end{document}


The RHS is just for comparison, the LHS is what I really need.



XeLaTeX (correct):
enter image description here



LuaLaTeX (wrong):
enter image description here



The website https://r12a.github.io/pickers/burmese/ might be useful for an analysis of the ligatures. Thanks to ShreevatsaR's comment below, the site https://en.wikipedia.org/wiki/Complex_text_layout might give some relevant information. If you are not familiar with the Noto fonts, you might want to read https://en.wikipedia.org/wiki/Noto_fonts.





Update. Version 2.7b (2019/02/12) of https://ctan.org/pkg/fontspec adds (experimental) support for additional rendering engines such as Harfbuzz or Graphite. I was not able to do a correct set up with those engines, yet, see also the comments on https://tex.stackexchange.com/a/441914/128553 below.










share|improve this question




















  • 5





    At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

    – ShreevatsaR
    May 13 '18 at 22:38











  • @ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

    – CampanIgnis
    May 14 '18 at 21:53













  • About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

    – ShreevatsaR
    Jun 4 '18 at 14:43











  • Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

    – ShreevatsaR
    Jun 4 '18 at 14:51














9












9








9


0






I am working with a project which requires LuaLaTeX (TeX Live 2018) and the Noto Serif Myanmar font. I need a few words of Burmese only. The MWE works well with XeLaTeX. But LuaLaTeX has a problem with the ligatures. Is there any way to get this to work with LuaLaTeX and the used Noto Serif Myanmar font (besides setting them with XeLaTeX and include them as graphics, e.g. with https://ctan.org/pkg/standalone)?



documentclass[landscape]{memoir}

usepackage{fontspec,polyglossia,url}

newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}
newfontfamily{burmeseFamilyDecom}{MyanmarMN}
newcommand{burmeseTest}[1]{
{burmeseFamily{} #1}
hfill
{burmeseFamilyDecom{} #1}}

begin{document}

burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

bigskip
burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


vfill
Might be usefull: url{https://r12a.github.io/pickers/burmese/}
end{document}


The RHS is just for comparison, the LHS is what I really need.



XeLaTeX (correct):
enter image description here



LuaLaTeX (wrong):
enter image description here



The website https://r12a.github.io/pickers/burmese/ might be useful for an analysis of the ligatures. Thanks to ShreevatsaR's comment below, the site https://en.wikipedia.org/wiki/Complex_text_layout might give some relevant information. If you are not familiar with the Noto fonts, you might want to read https://en.wikipedia.org/wiki/Noto_fonts.





Update. Version 2.7b (2019/02/12) of https://ctan.org/pkg/fontspec adds (experimental) support for additional rendering engines such as Harfbuzz or Graphite. I was not able to do a correct set up with those engines, yet, see also the comments on https://tex.stackexchange.com/a/441914/128553 below.










share|improve this question
















I am working with a project which requires LuaLaTeX (TeX Live 2018) and the Noto Serif Myanmar font. I need a few words of Burmese only. The MWE works well with XeLaTeX. But LuaLaTeX has a problem with the ligatures. Is there any way to get this to work with LuaLaTeX and the used Noto Serif Myanmar font (besides setting them with XeLaTeX and include them as graphics, e.g. with https://ctan.org/pkg/standalone)?



documentclass[landscape]{memoir}

usepackage{fontspec,polyglossia,url}

newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}
newfontfamily{burmeseFamilyDecom}{MyanmarMN}
newcommand{burmeseTest}[1]{
{burmeseFamily{} #1}
hfill
{burmeseFamilyDecom{} #1}}

begin{document}

burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

bigskip
burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


vfill
Might be usefull: url{https://r12a.github.io/pickers/burmese/}
end{document}


The RHS is just for comparison, the LHS is what I really need.



XeLaTeX (correct):
enter image description here



LuaLaTeX (wrong):
enter image description here



The website https://r12a.github.io/pickers/burmese/ might be useful for an analysis of the ligatures. Thanks to ShreevatsaR's comment below, the site https://en.wikipedia.org/wiki/Complex_text_layout might give some relevant information. If you are not familiar with the Noto fonts, you might want to read https://en.wikipedia.org/wiki/Noto_fonts.





Update. Version 2.7b (2019/02/12) of https://ctan.org/pkg/fontspec adds (experimental) support for additional rendering engines such as Harfbuzz or Graphite. I was not able to do a correct set up with those engines, yet, see also the comments on https://tex.stackexchange.com/a/441914/128553 below.







luatex fontspec languages ligatures brahmic-scripts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 16 at 13:00







CampanIgnis

















asked May 13 '18 at 22:29









CampanIgnisCampanIgnis

2,6942932




2,6942932








  • 5





    At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

    – ShreevatsaR
    May 13 '18 at 22:38











  • @ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

    – CampanIgnis
    May 14 '18 at 21:53













  • About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

    – ShreevatsaR
    Jun 4 '18 at 14:43











  • Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

    – ShreevatsaR
    Jun 4 '18 at 14:51














  • 5





    At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

    – ShreevatsaR
    May 13 '18 at 22:38











  • @ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

    – CampanIgnis
    May 14 '18 at 21:53













  • About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

    – ShreevatsaR
    Jun 4 '18 at 14:43











  • Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

    – ShreevatsaR
    Jun 4 '18 at 14:51








5




5





At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

– ShreevatsaR
May 13 '18 at 22:38





At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts — it supports only simple scripts where characters are laid out one after the other. You just have to use XeTeX, or images, I'm afraid. (You should also ask on the LuaTeX mailing list, as a few days ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!) Although, if you need only a few words, there may be a laborious way involving you doing the work of text-shaping (as done by Harfbuzz etc) manually (I don't know the details…)

– ShreevatsaR
May 13 '18 at 22:38













@ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

– CampanIgnis
May 14 '18 at 21:53







@ShreevatsaR Thank you for your comment and the good explanation. Indeed I hope for a laborious way, although the inclusion of a pdf works so far with some obvious drawbacks.

– CampanIgnis
May 14 '18 at 21:53















About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

– ShreevatsaR
Jun 4 '18 at 14:43





About latest edit: as there's already an indic tag, don't see the point of creating a new brahmic-scripts tag which has only this question. Please use your tag-creation powers wisely. :-) Sure, there exist many Brahmi-origin scripts that many would not call “Indic”, such as all the Southeast Asian scripts… but the question when creating tags is really “will enough questions get tagged with this, so that someone is likely to follow this tag, so that adding this tag will attract attention?” — I don't see that happening here; already many Indic questions are not tagged indic.

– ShreevatsaR
Jun 4 '18 at 14:43













Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

– ShreevatsaR
Jun 4 '18 at 14:51





Technically, the feature for which support is needed here is known among other things as complex text layout; it's not specific to Indic and other scripts derived from Brahmi. But I"m not suggesting creating a complex-text-layout tag either, for the same reasons. In any case I don't see the point of keeping this question open; let me just post my comment as answer.

– ShreevatsaR
Jun 4 '18 at 14:51










3 Answers
3






active

oldest

votes


















7














Here is a sample using my Luatex-harfbuzz-shaper:



documentclass[landscape]{memoir}

usepackage{harfbuzz}
% usepackage{fontspec,polyglossia,url}
usepackage{url}

fontburmeseFamily={Noto Sans Myanmar:+script=mymr;+language=mya} at 12pt
fontburmeseFamilyDecom={Noto Sans Myanmar:+script=dflt;+language=dflt} at 12pt
newcommand{burmeseTest}[1]{
{burmeseFamily{} #1}
hfill
{burmeseFamilyDecom{} #1}
}

begin{document}

burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

bigskip
burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


bigskip
Might be usefull: url{https://r12a.github.io/pickers/burmese/}
end{document}


Note that it expects the Noto Sans Myanmar is installed on your system. You also need to install Luaharfbuzz on your system.



This is the result:



enter image description here






share|improve this answer
























  • I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

    – CampanIgnis
    Jul 17 '18 at 11:01








  • 1





    @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

    – michal.h21
    Jul 17 '18 at 11:27











  • I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

    – CampanIgnis
    Jul 17 '18 at 13:39








  • 2





    @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

    – michal.h21
    Jul 17 '18 at 14:00











  • Thank you very much for your efforts. I will try it later.

    – CampanIgnis
    Jul 17 '18 at 17:49



















6














At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts. This is because it supports only simple scripts where characters are laid out one after the other; not scripts that require complex text layout.



There is some rudimentary support for Devanagari, and possibly for Malayalam, but not for Burmese as far as I know. Your options if you need to use such an “unsupported” script are:




  • Just use XeTeX (or pdfTeX with a package for your script/language, if it exists), instead of LuaTeX (e.g. if you're using LaTeX, compile with xelatex instead of lualatex).


  • Generate the text in another application (like XeTeX or whatever), and insert it as images into your LuaTeX document.


  • Use one of the “experimental” ways of using a library (Harfbuzz) from LuaTeX, for text shaping. Some links (that you'll have to make sense of yourself): tatzetwerk/luatex-harfbuzz, deepakjois/luatex-harfbuzz, michal-h21/luatex-harfbuzz-shaper (associated mailing list post), recent article by two of the LuaTeX developers.


  • Figure out how support is done in LuaTeX for Devanagari, and imitate it for Burmese (and other scripts). (I don't know how easy this is: on the one hand Harfbuzz is a long-running project with a lot of complexity; on the other hand on a cursory look the small amount of support code in LuaTeX for Devanagari seems to be adequate for some common purposes… though I haven't tested it in any detail.)



You should also ask on the LuaTeX mailing list: a couple of months ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!






share|improve this answer































    3














    @ShreevatsaR has given some good thoughts. However, since I only needed two words, I included the words as PDF. This works reasonably and economically as I do not need to invest much time to try to make his suggestions work as I have never worked with the tools he suggested and my attempt with a correct harfbuzz setup ended in failure.
    In case someone is interested in the details:



    We compile the following file Burmese.tex with XeLaTeX:



    documentclass[11pt,tikz,border=0ex]{standalone}

    usepackage{fontspec,polyglossia,url}

    %This is necessary to scale the Burmese font.
    setmainfont{texgyrepagella-regular.otf}

    %You may want to choose NotoSerifMyanmar-Medium.ttf or a different font for a better optical match
    newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}[Scale=MatchLowercase]
    %There might be simpler ways to get equivalent results.
    newcommand{burmeseFont}[1]{tikz node[inner sep=0pt] {burmeseFamily{}#1};}

    begin{document}

    burmeseFont{င်းကွန်းင်းလောင်းတော်ကြီး}

    burmeseFont{မ္မတီခေါင်းလောင်းကြီး}

    end{document}


    This gives the file Burmese.pdf with the two following pages:
    enter image description here



    We can use this file as follows:



    documentclass[11pt]{memoir}

    usepackage{fontspec,polyglossia,url,pdfpages}

    setmainfont{texgyrepagella-regular.otf}

    %Lowering the PDF gives matching baselines
    newcommand{burmeseA}
    {mbox{lower 1.00exhbox{includegraphics[page=1]{Burmese.pdf}}}}
    newcommand{burmeseB}
    {mbox{lower 1.00exhbox{includegraphics[page=2]{Burmese.pdf}}}}

    begin{document}

    Lorem ipsum burmeseA{} dolor sit manet.

    Et burmeseB{} nil nisi colloquor.

    end{document}


    To get the following result.
    enter image description here



    Matching font size and mainfont in both files are important. One can vary the font size and styles in the file Burmese.tex in case different typefaces are needed.
    One note: The Burmese letters in the second PDF are not copyable.






    share|improve this answer


























    • Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

      – Sverre
      Jul 15 '18 at 15:48











    • @Sverre I beg to differ. I already wrote about that option in my question.

      – CampanIgnis
      Jul 15 '18 at 17:17











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f431430%2fissue-with-burmese-and-lualatex%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    7














    Here is a sample using my Luatex-harfbuzz-shaper:



    documentclass[landscape]{memoir}

    usepackage{harfbuzz}
    % usepackage{fontspec,polyglossia,url}
    usepackage{url}

    fontburmeseFamily={Noto Sans Myanmar:+script=mymr;+language=mya} at 12pt
    fontburmeseFamilyDecom={Noto Sans Myanmar:+script=dflt;+language=dflt} at 12pt
    newcommand{burmeseTest}[1]{
    {burmeseFamily{} #1}
    hfill
    {burmeseFamilyDecom{} #1}
    }

    begin{document}

    burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

    bigskip
    burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


    bigskip
    Might be usefull: url{https://r12a.github.io/pickers/burmese/}
    end{document}


    Note that it expects the Noto Sans Myanmar is installed on your system. You also need to install Luaharfbuzz on your system.



    This is the result:



    enter image description here






    share|improve this answer
























    • I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

      – CampanIgnis
      Jul 17 '18 at 11:01








    • 1





      @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

      – michal.h21
      Jul 17 '18 at 11:27











    • I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

      – CampanIgnis
      Jul 17 '18 at 13:39








    • 2





      @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

      – michal.h21
      Jul 17 '18 at 14:00











    • Thank you very much for your efforts. I will try it later.

      – CampanIgnis
      Jul 17 '18 at 17:49
















    7














    Here is a sample using my Luatex-harfbuzz-shaper:



    documentclass[landscape]{memoir}

    usepackage{harfbuzz}
    % usepackage{fontspec,polyglossia,url}
    usepackage{url}

    fontburmeseFamily={Noto Sans Myanmar:+script=mymr;+language=mya} at 12pt
    fontburmeseFamilyDecom={Noto Sans Myanmar:+script=dflt;+language=dflt} at 12pt
    newcommand{burmeseTest}[1]{
    {burmeseFamily{} #1}
    hfill
    {burmeseFamilyDecom{} #1}
    }

    begin{document}

    burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

    bigskip
    burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


    bigskip
    Might be usefull: url{https://r12a.github.io/pickers/burmese/}
    end{document}


    Note that it expects the Noto Sans Myanmar is installed on your system. You also need to install Luaharfbuzz on your system.



    This is the result:



    enter image description here






    share|improve this answer
























    • I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

      – CampanIgnis
      Jul 17 '18 at 11:01








    • 1





      @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

      – michal.h21
      Jul 17 '18 at 11:27











    • I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

      – CampanIgnis
      Jul 17 '18 at 13:39








    • 2





      @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

      – michal.h21
      Jul 17 '18 at 14:00











    • Thank you very much for your efforts. I will try it later.

      – CampanIgnis
      Jul 17 '18 at 17:49














    7












    7








    7







    Here is a sample using my Luatex-harfbuzz-shaper:



    documentclass[landscape]{memoir}

    usepackage{harfbuzz}
    % usepackage{fontspec,polyglossia,url}
    usepackage{url}

    fontburmeseFamily={Noto Sans Myanmar:+script=mymr;+language=mya} at 12pt
    fontburmeseFamilyDecom={Noto Sans Myanmar:+script=dflt;+language=dflt} at 12pt
    newcommand{burmeseTest}[1]{
    {burmeseFamily{} #1}
    hfill
    {burmeseFamilyDecom{} #1}
    }

    begin{document}

    burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

    bigskip
    burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


    bigskip
    Might be usefull: url{https://r12a.github.io/pickers/burmese/}
    end{document}


    Note that it expects the Noto Sans Myanmar is installed on your system. You also need to install Luaharfbuzz on your system.



    This is the result:



    enter image description here






    share|improve this answer













    Here is a sample using my Luatex-harfbuzz-shaper:



    documentclass[landscape]{memoir}

    usepackage{harfbuzz}
    % usepackage{fontspec,polyglossia,url}
    usepackage{url}

    fontburmeseFamily={Noto Sans Myanmar:+script=mymr;+language=mya} at 12pt
    fontburmeseFamilyDecom={Noto Sans Myanmar:+script=dflt;+language=dflt} at 12pt
    newcommand{burmeseTest}[1]{
    {burmeseFamily{} #1}
    hfill
    {burmeseFamilyDecom{} #1}
    }

    begin{document}

    burmeseTest{င်းကွန်းင်းလောင်းတော်ကြီး}

    bigskip
    burmeseTest{မ္မတီခေါင်းလောင်းကြီး}


    bigskip
    Might be usefull: url{https://r12a.github.io/pickers/burmese/}
    end{document}


    Note that it expects the Noto Sans Myanmar is installed on your system. You also need to install Luaharfbuzz on your system.



    This is the result:



    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 16 '18 at 17:42









    michal.h21michal.h21

    31.4k447104




    31.4k447104













    • I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

      – CampanIgnis
      Jul 17 '18 at 11:01








    • 1





      @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

      – michal.h21
      Jul 17 '18 at 11:27











    • I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

      – CampanIgnis
      Jul 17 '18 at 13:39








    • 2





      @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

      – michal.h21
      Jul 17 '18 at 14:00











    • Thank you very much for your efforts. I will try it later.

      – CampanIgnis
      Jul 17 '18 at 17:49



















    • I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

      – CampanIgnis
      Jul 17 '18 at 11:01








    • 1





      @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

      – michal.h21
      Jul 17 '18 at 11:27











    • I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

      – CampanIgnis
      Jul 17 '18 at 13:39








    • 2





      @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

      – michal.h21
      Jul 17 '18 at 14:00











    • Thank you very much for your efforts. I will try it later.

      – CampanIgnis
      Jul 17 '18 at 17:49

















    I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

    – CampanIgnis
    Jul 17 '18 at 11:01







    I have installed harfbuzz and luaharfbuzz. I downloaded the repositories luaharfbuzz-master and luatex-harfbuzz-shaper-master and made them accessible via texhash. But I have the following problem: [directlua]:1: module 'hb_paths' not found: no field package.preload['hb_paths'] [kpse lua searcher] file not found: 'hb_paths' [kpse C searcher] file not found: 'hb_paths' Any ideas on the missing file?

    – CampanIgnis
    Jul 17 '18 at 11:01






    1




    1





    @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

    – michal.h21
    Jul 17 '18 at 11:27





    @CampanIgnis try to run command make make_paths in the luatex-harfbuzz-shaper directory, it should generate the needed file

    – michal.h21
    Jul 17 '18 at 11:27













    I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

    – CampanIgnis
    Jul 17 '18 at 13:39







    I now have that file, unfortunately another problem arose: PANIC: unprotected error in call to Lua API (error in __gc metamethod (bad argument #1 to '?' (harfbuzz.Buffer expected, got table))) Abort In case you have the time and motivation to try to solve this problem (and perhaps some other problems to come) a chat room might be a better solution.

    – CampanIgnis
    Jul 17 '18 at 13:39






    2




    2





    @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

    – michal.h21
    Jul 17 '18 at 14:00





    @CampanIgnis it can be quite hard to install Luaharfbuzz correctly, it builds a binary library, which needs to be compatible with LuaTeX. For example, on my machine, Luarocks compile for Lua 5.3 by default, but LuaTeX uses Lua 5.2. So I have to use some tricks to get correct library. See this discussion. The compilation against Lua 5.2 worked for me.

    – michal.h21
    Jul 17 '18 at 14:00













    Thank you very much for your efforts. I will try it later.

    – CampanIgnis
    Jul 17 '18 at 17:49





    Thank you very much for your efforts. I will try it later.

    – CampanIgnis
    Jul 17 '18 at 17:49











    6














    At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts. This is because it supports only simple scripts where characters are laid out one after the other; not scripts that require complex text layout.



    There is some rudimentary support for Devanagari, and possibly for Malayalam, but not for Burmese as far as I know. Your options if you need to use such an “unsupported” script are:




    • Just use XeTeX (or pdfTeX with a package for your script/language, if it exists), instead of LuaTeX (e.g. if you're using LaTeX, compile with xelatex instead of lualatex).


    • Generate the text in another application (like XeTeX or whatever), and insert it as images into your LuaTeX document.


    • Use one of the “experimental” ways of using a library (Harfbuzz) from LuaTeX, for text shaping. Some links (that you'll have to make sense of yourself): tatzetwerk/luatex-harfbuzz, deepakjois/luatex-harfbuzz, michal-h21/luatex-harfbuzz-shaper (associated mailing list post), recent article by two of the LuaTeX developers.


    • Figure out how support is done in LuaTeX for Devanagari, and imitate it for Burmese (and other scripts). (I don't know how easy this is: on the one hand Harfbuzz is a long-running project with a lot of complexity; on the other hand on a cursory look the small amount of support code in LuaTeX for Devanagari seems to be adequate for some common purposes… though I haven't tested it in any detail.)



    You should also ask on the LuaTeX mailing list: a couple of months ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!






    share|improve this answer




























      6














      At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts. This is because it supports only simple scripts where characters are laid out one after the other; not scripts that require complex text layout.



      There is some rudimentary support for Devanagari, and possibly for Malayalam, but not for Burmese as far as I know. Your options if you need to use such an “unsupported” script are:




      • Just use XeTeX (or pdfTeX with a package for your script/language, if it exists), instead of LuaTeX (e.g. if you're using LaTeX, compile with xelatex instead of lualatex).


      • Generate the text in another application (like XeTeX or whatever), and insert it as images into your LuaTeX document.


      • Use one of the “experimental” ways of using a library (Harfbuzz) from LuaTeX, for text shaping. Some links (that you'll have to make sense of yourself): tatzetwerk/luatex-harfbuzz, deepakjois/luatex-harfbuzz, michal-h21/luatex-harfbuzz-shaper (associated mailing list post), recent article by two of the LuaTeX developers.


      • Figure out how support is done in LuaTeX for Devanagari, and imitate it for Burmese (and other scripts). (I don't know how easy this is: on the one hand Harfbuzz is a long-running project with a lot of complexity; on the other hand on a cursory look the small amount of support code in LuaTeX for Devanagari seems to be adequate for some common purposes… though I haven't tested it in any detail.)



      You should also ask on the LuaTeX mailing list: a couple of months ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!






      share|improve this answer


























        6












        6








        6







        At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts. This is because it supports only simple scripts where characters are laid out one after the other; not scripts that require complex text layout.



        There is some rudimentary support for Devanagari, and possibly for Malayalam, but not for Burmese as far as I know. Your options if you need to use such an “unsupported” script are:




        • Just use XeTeX (or pdfTeX with a package for your script/language, if it exists), instead of LuaTeX (e.g. if you're using LaTeX, compile with xelatex instead of lualatex).


        • Generate the text in another application (like XeTeX or whatever), and insert it as images into your LuaTeX document.


        • Use one of the “experimental” ways of using a library (Harfbuzz) from LuaTeX, for text shaping. Some links (that you'll have to make sense of yourself): tatzetwerk/luatex-harfbuzz, deepakjois/luatex-harfbuzz, michal-h21/luatex-harfbuzz-shaper (associated mailing list post), recent article by two of the LuaTeX developers.


        • Figure out how support is done in LuaTeX for Devanagari, and imitate it for Burmese (and other scripts). (I don't know how easy this is: on the one hand Harfbuzz is a long-running project with a lot of complexity; on the other hand on a cursory look the small amount of support code in LuaTeX for Devanagari seems to be adequate for some common purposes… though I haven't tested it in any detail.)



        You should also ask on the LuaTeX mailing list: a couple of months ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!






        share|improve this answer













        At the moment, LuaTeX does not support most of the world's scripts, including Burmese and other Brahmi-derived scripts. This is because it supports only simple scripts where characters are laid out one after the other; not scripts that require complex text layout.



        There is some rudimentary support for Devanagari, and possibly for Malayalam, but not for Burmese as far as I know. Your options if you need to use such an “unsupported” script are:




        • Just use XeTeX (or pdfTeX with a package for your script/language, if it exists), instead of LuaTeX (e.g. if you're using LaTeX, compile with xelatex instead of lualatex).


        • Generate the text in another application (like XeTeX or whatever), and insert it as images into your LuaTeX document.


        • Use one of the “experimental” ways of using a library (Harfbuzz) from LuaTeX, for text shaping. Some links (that you'll have to make sense of yourself): tatzetwerk/luatex-harfbuzz, deepakjois/luatex-harfbuzz, michal-h21/luatex-harfbuzz-shaper (associated mailing list post), recent article by two of the LuaTeX developers.


        • Figure out how support is done in LuaTeX for Devanagari, and imitate it for Burmese (and other scripts). (I don't know how easy this is: on the one hand Harfbuzz is a long-running project with a lot of complexity; on the other hand on a cursory look the small amount of support code in LuaTeX for Devanagari seems to be adequate for some common purposes… though I haven't tested it in any detail.)



        You should also ask on the LuaTeX mailing list: a couple of months ago there was a claim that no one had ever asked the LuaTeX developers for support for such scripts!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 4 '18 at 15:12









        ShreevatsaRShreevatsaR

        27.8k873101




        27.8k873101























            3














            @ShreevatsaR has given some good thoughts. However, since I only needed two words, I included the words as PDF. This works reasonably and economically as I do not need to invest much time to try to make his suggestions work as I have never worked with the tools he suggested and my attempt with a correct harfbuzz setup ended in failure.
            In case someone is interested in the details:



            We compile the following file Burmese.tex with XeLaTeX:



            documentclass[11pt,tikz,border=0ex]{standalone}

            usepackage{fontspec,polyglossia,url}

            %This is necessary to scale the Burmese font.
            setmainfont{texgyrepagella-regular.otf}

            %You may want to choose NotoSerifMyanmar-Medium.ttf or a different font for a better optical match
            newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}[Scale=MatchLowercase]
            %There might be simpler ways to get equivalent results.
            newcommand{burmeseFont}[1]{tikz node[inner sep=0pt] {burmeseFamily{}#1};}

            begin{document}

            burmeseFont{င်းကွန်းင်းလောင်းတော်ကြီး}

            burmeseFont{မ္မတီခေါင်းလောင်းကြီး}

            end{document}


            This gives the file Burmese.pdf with the two following pages:
            enter image description here



            We can use this file as follows:



            documentclass[11pt]{memoir}

            usepackage{fontspec,polyglossia,url,pdfpages}

            setmainfont{texgyrepagella-regular.otf}

            %Lowering the PDF gives matching baselines
            newcommand{burmeseA}
            {mbox{lower 1.00exhbox{includegraphics[page=1]{Burmese.pdf}}}}
            newcommand{burmeseB}
            {mbox{lower 1.00exhbox{includegraphics[page=2]{Burmese.pdf}}}}

            begin{document}

            Lorem ipsum burmeseA{} dolor sit manet.

            Et burmeseB{} nil nisi colloquor.

            end{document}


            To get the following result.
            enter image description here



            Matching font size and mainfont in both files are important. One can vary the font size and styles in the file Burmese.tex in case different typefaces are needed.
            One note: The Burmese letters in the second PDF are not copyable.






            share|improve this answer


























            • Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

              – Sverre
              Jul 15 '18 at 15:48











            • @Sverre I beg to differ. I already wrote about that option in my question.

              – CampanIgnis
              Jul 15 '18 at 17:17
















            3














            @ShreevatsaR has given some good thoughts. However, since I only needed two words, I included the words as PDF. This works reasonably and economically as I do not need to invest much time to try to make his suggestions work as I have never worked with the tools he suggested and my attempt with a correct harfbuzz setup ended in failure.
            In case someone is interested in the details:



            We compile the following file Burmese.tex with XeLaTeX:



            documentclass[11pt,tikz,border=0ex]{standalone}

            usepackage{fontspec,polyglossia,url}

            %This is necessary to scale the Burmese font.
            setmainfont{texgyrepagella-regular.otf}

            %You may want to choose NotoSerifMyanmar-Medium.ttf or a different font for a better optical match
            newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}[Scale=MatchLowercase]
            %There might be simpler ways to get equivalent results.
            newcommand{burmeseFont}[1]{tikz node[inner sep=0pt] {burmeseFamily{}#1};}

            begin{document}

            burmeseFont{င်းကွန်းင်းလောင်းတော်ကြီး}

            burmeseFont{မ္မတီခေါင်းလောင်းကြီး}

            end{document}


            This gives the file Burmese.pdf with the two following pages:
            enter image description here



            We can use this file as follows:



            documentclass[11pt]{memoir}

            usepackage{fontspec,polyglossia,url,pdfpages}

            setmainfont{texgyrepagella-regular.otf}

            %Lowering the PDF gives matching baselines
            newcommand{burmeseA}
            {mbox{lower 1.00exhbox{includegraphics[page=1]{Burmese.pdf}}}}
            newcommand{burmeseB}
            {mbox{lower 1.00exhbox{includegraphics[page=2]{Burmese.pdf}}}}

            begin{document}

            Lorem ipsum burmeseA{} dolor sit manet.

            Et burmeseB{} nil nisi colloquor.

            end{document}


            To get the following result.
            enter image description here



            Matching font size and mainfont in both files are important. One can vary the font size and styles in the file Burmese.tex in case different typefaces are needed.
            One note: The Burmese letters in the second PDF are not copyable.






            share|improve this answer


























            • Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

              – Sverre
              Jul 15 '18 at 15:48











            • @Sverre I beg to differ. I already wrote about that option in my question.

              – CampanIgnis
              Jul 15 '18 at 17:17














            3












            3








            3







            @ShreevatsaR has given some good thoughts. However, since I only needed two words, I included the words as PDF. This works reasonably and economically as I do not need to invest much time to try to make his suggestions work as I have never worked with the tools he suggested and my attempt with a correct harfbuzz setup ended in failure.
            In case someone is interested in the details:



            We compile the following file Burmese.tex with XeLaTeX:



            documentclass[11pt,tikz,border=0ex]{standalone}

            usepackage{fontspec,polyglossia,url}

            %This is necessary to scale the Burmese font.
            setmainfont{texgyrepagella-regular.otf}

            %You may want to choose NotoSerifMyanmar-Medium.ttf or a different font for a better optical match
            newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}[Scale=MatchLowercase]
            %There might be simpler ways to get equivalent results.
            newcommand{burmeseFont}[1]{tikz node[inner sep=0pt] {burmeseFamily{}#1};}

            begin{document}

            burmeseFont{င်းကွန်းင်းလောင်းတော်ကြီး}

            burmeseFont{မ္မတီခေါင်းလောင်းကြီး}

            end{document}


            This gives the file Burmese.pdf with the two following pages:
            enter image description here



            We can use this file as follows:



            documentclass[11pt]{memoir}

            usepackage{fontspec,polyglossia,url,pdfpages}

            setmainfont{texgyrepagella-regular.otf}

            %Lowering the PDF gives matching baselines
            newcommand{burmeseA}
            {mbox{lower 1.00exhbox{includegraphics[page=1]{Burmese.pdf}}}}
            newcommand{burmeseB}
            {mbox{lower 1.00exhbox{includegraphics[page=2]{Burmese.pdf}}}}

            begin{document}

            Lorem ipsum burmeseA{} dolor sit manet.

            Et burmeseB{} nil nisi colloquor.

            end{document}


            To get the following result.
            enter image description here



            Matching font size and mainfont in both files are important. One can vary the font size and styles in the file Burmese.tex in case different typefaces are needed.
            One note: The Burmese letters in the second PDF are not copyable.






            share|improve this answer















            @ShreevatsaR has given some good thoughts. However, since I only needed two words, I included the words as PDF. This works reasonably and economically as I do not need to invest much time to try to make his suggestions work as I have never worked with the tools he suggested and my attempt with a correct harfbuzz setup ended in failure.
            In case someone is interested in the details:



            We compile the following file Burmese.tex with XeLaTeX:



            documentclass[11pt,tikz,border=0ex]{standalone}

            usepackage{fontspec,polyglossia,url}

            %This is necessary to scale the Burmese font.
            setmainfont{texgyrepagella-regular.otf}

            %You may want to choose NotoSerifMyanmar-Medium.ttf or a different font for a better optical match
            newfontfamily{burmeseFamily}{NotoSerifMyanmar-Regular.ttf}[Scale=MatchLowercase]
            %There might be simpler ways to get equivalent results.
            newcommand{burmeseFont}[1]{tikz node[inner sep=0pt] {burmeseFamily{}#1};}

            begin{document}

            burmeseFont{င်းကွန်းင်းလောင်းတော်ကြီး}

            burmeseFont{မ္မတီခေါင်းလောင်းကြီး}

            end{document}


            This gives the file Burmese.pdf with the two following pages:
            enter image description here



            We can use this file as follows:



            documentclass[11pt]{memoir}

            usepackage{fontspec,polyglossia,url,pdfpages}

            setmainfont{texgyrepagella-regular.otf}

            %Lowering the PDF gives matching baselines
            newcommand{burmeseA}
            {mbox{lower 1.00exhbox{includegraphics[page=1]{Burmese.pdf}}}}
            newcommand{burmeseB}
            {mbox{lower 1.00exhbox{includegraphics[page=2]{Burmese.pdf}}}}

            begin{document}

            Lorem ipsum burmeseA{} dolor sit manet.

            Et burmeseB{} nil nisi colloquor.

            end{document}


            To get the following result.
            enter image description here



            Matching font size and mainfont in both files are important. One can vary the font size and styles in the file Burmese.tex in case different typefaces are needed.
            One note: The Burmese letters in the second PDF are not copyable.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 16 at 13:03

























            answered Jul 14 '18 at 13:51









            CampanIgnisCampanIgnis

            2,6942932




            2,6942932













            • Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

              – Sverre
              Jul 15 '18 at 15:48











            • @Sverre I beg to differ. I already wrote about that option in my question.

              – CampanIgnis
              Jul 15 '18 at 17:17



















            • Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

              – Sverre
              Jul 15 '18 at 15:48











            • @Sverre I beg to differ. I already wrote about that option in my question.

              – CampanIgnis
              Jul 15 '18 at 17:17

















            Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

            – Sverre
            Jul 15 '18 at 15:48





            Since you're doing exactly what @ShreevatsaR suggests in his second bullet point, it seems a bit strange that you accept your own answer instead of his.

            – Sverre
            Jul 15 '18 at 15:48













            @Sverre I beg to differ. I already wrote about that option in my question.

            – CampanIgnis
            Jul 15 '18 at 17:17





            @Sverre I beg to differ. I already wrote about that option in my question.

            – CampanIgnis
            Jul 15 '18 at 17:17


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f431430%2fissue-with-burmese-and-lualatex%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?