Closed dscorbett closed 4 years ago
It is not a font issue. The reported difference is a difference in rendering logic between the “guru” and “gur2” rendering.
It is a font issue. It can’t be intentional for the font to behave differently for 'guru' and 'gur2'. It takes about a minute to fix it: just add 'gur2' to the existing 'half' lookup.
Gurmukhi does not have half forms.
Despite its name, 'half' isn’t specifically for half forms: it is for consonant–halant sequences to the left of which pre-base vowels should be reordered. The OpenType Gurmukhi spec explains that there are two options for rendering a syllable like ⟨ਕ੍ਗਿ⟩:
Option 1: (default results) because the Ka is not listed in the half feature; the shaping engine treats the Ka as the first main consonant and re-orders the I-matra immediately in front of the previous base consonant.
Option 2: While the Ka does not have a true half form in Gurmukhi, it can be listed in the 'half' feature lookup substituting the 'halant form' of Ka. Thus, the shaping engine will treat it as a half form and the I-matra will be positioned immediately in front of the "half-form" K(a).
Currently, users of this font on old Windows computers will get option 2, and other users of this font will get option 1. Normally, a font should as much as possible behave the same on all supported platforms, but here the font goes out of its way to be inconsistent with itself.
If you prefer option 1, delete the 'half' lookup. If you prefer option 2, add 'gur2' to the 'half' lookup. I have verified that both of these edits produce consistent results for both script tags.
If the goal was to have no difference between "guru" and "gur2" rendering, there would not have been a "gur2" rendering.
The "guru" rendering was added to the original font in 2013, to support Windows XP generation shapers. It is set up within the assumptions and limitations of the initial attempt to support Indic shaping. I am not sure if the 2019 fonts will encounter the old rendering at all. But when they do, they are unlikely to be completely functional and render differently no matter what I do. The change to "gur2" intends to be an improvement. But even "gur2" renders different with Google, Apple, Adobe and Microsoft shapers for some of the characters.
It was not possible to have option 1 rendering in the "guru" world, because the re-ordering took place before any feature was applied.
I do not think Panjabi makes much use of the virama as a visible character. It isn't even mentioned in my language guide. It may show up in transliteration of Sanskrit or English. So this is a somewhat academic discussion.
Font
NotoSansGurmukhi-Regular.ttf
Where the font came from, and when
Site: https://noto-website-2.storage.googleapis.com/pkgs/NotoSansGurmukhi-unhinted.zip Date: 2018-03-29
Font version
Version 1.03 uh
Issue
Left-side vowel signs are reordered differently between the script tags 'guru' and 'gur2'. This is because the 'half' lookup is only defined for 'guru'.
Character data
ਕ੍ਖਿ U+0A15 GURMUKHI LETTER KA U+0A4D GURMUKHI SIGN VIRAMA U+0A16 GURMUKHI LETTER KHA U+0A3F GURMUKHI VOWEL SIGN I
Screenshot
hb-view NotoSansGurmukhi-Regular.ttf -O png -u a15,a4d,a16,a3f --language x-hbscguru
hb-view NotoSansGurmukhi-Regular.ttf -O png -u a15,a4d,a16,a3f --language x-hbscgur2