Hi Love!
It's a relief you have a method that converts into glyphs (the resulting shape after combining characters). However it is indeed not convenient.
To make it work with LazPaint, and in fact BGRABitmap, we need to know which characters combine together. In the example, it seems that म्चा is the compound of म् and चा. If I understand correctly, when displayed, you've obtained म्चा.
Looking at the wikipedia page of
Newari scripts, I conclude that characters combine:
- Either when there are diacrtric marks (this is already handled)
- Or when there are multiple consonants (with the example of म्चा)
And I have the impression that consonant combine when the previous consonant has the virama (the "bottom-right apostrophe"). In this case "म्" and not "म" so in the example: "म्" + "च" = "म्च"
Is this correct? Would it cover all cases?