KhalisFoundation / anvaad-js

Transliteration toolkit for Gurmukhi ASCII to Unicode, romanized and other character sets
https://khalisfoundation.github.io/anvaad-js/
MIT License
7 stars 8 forks source link

Potential bug when converting a "ਸ਼" with sihaari #92

Closed dsomel21 closed 3 months ago

dsomel21 commented 4 years ago

ਵਾਹਿਗੁਰੂਜੀਕਾਖਾਲਸਾਵਾਹਿਗੁਰੂਜੀਕੀਫਤੇ

I noticed a couple of times when I was previewing words like: "ਪੋਸ਼ਿਸ਼" or "ਬਖਸ਼ਿਸ਼" the Gurmukhi script (the English conversion) would be a little off.

Take this example:

anv.unicode('ਸ਼', true); // expects sæ
anv.unicode('ਸ਼ਿ', true); // expects "isæ"
anv.unicode('ਸ਼ਿਸ਼', true); // expects "isæsæ"

But the results are different. Check it out:

Screen Shot 2020-09-20 at 9 58 55 AM

Here is what "ਪੋਸ਼ਿਸ਼" looks like when incorrectly converted using anv.unicide('ਪੋਸ਼ਿਸ਼"', true);. The image below is being displayed with the OpenGurbaniAkhar-Regular.otf font.

Screen Shot 2020-09-20 at 9 59 52 AM

I've only seen this happen with the Sihaari, other vowels are looking good.

Screen Shot 2020-09-20 at 10 21 40 AM