notofonts / devanagari

Noto Devanagari
SIL Open Font License 1.1
1 stars 2 forks source link

Weird spacing effects with ardhavisarga in Noto Serif Devanagari #9

Closed NorbertLindenberg closed 1 year ago

NorbertLindenberg commented 4 years ago

Noto Serif Devanagari (version 2.001) shows the characters U+1CF2 VEDIC SIGN ARDHAVISARGA and U+1CF3 VEDIC SIGN ROTATED ARDHAVISARGA with different weird spacing effects in different browsers.

To reproduce, go to https://lindenbergsoftware.com/google/noto/deva-ardhavisarga.html

The columns for Sans and Serif contain the same character sequences, five times each the characters mentioned above, first by themselves, then bracket by some other Devanagari characters. In the Sans column (using Noto Sans Devanagari), the character are shown five times. In the Serif column (using Noto Serif Devanagari), it often appears that there’s only one character.

Microsoft Edge 44.19041.1.0; EdgeHTML 18.19041; Microsoft Windows 10 version 2004:

Screen Shot 2020-08-19 at 23 10 45

Safari 13.1.2 on macOS 10.15.6:

Screen Shot 2020-08-19 at 23 06 11

Firefox 79.0 on macOS 10.14.6:

Screen Shot 2020-08-19 at 23 13 35
nizarsq commented 4 years ago

@NorbertLindenberg could you try to reproduce this issue using fonts in the following directories: https://github.com/googlefonts/noto-fonts/tree/master/phaseIII_only/unhinted/ttf/NotoSansDevanagari/NotoSansDevanagari-Regular.ttf https://github.com/googlefonts/noto-fonts/tree/master/phaseIII_only/unhinted/ttf/NotoSansDevanagariUI/NotoSansDevanagariUI-Regular.ttf https://github.com/googlefonts/noto-fonts/tree/master/phaseIII_only/unhinted/ttf/NotoSerifDevanagari/NotoSerifDevanagari-Regular.ttf

I couldn't reproduce it on Firefox, Chrome or Safari.

Screen Shot 2020-08-20 at 5 08 57 PM
NorbertLindenberg commented 4 years ago

Those are the exact versions that I'm using, except I'm not using the UI flavor.

When you point your browsers to my web page, do you see what I'm seeing? Can you try just the sequences of ardhavisarga in your test environment, without क and danda?

nizarsq commented 4 years ago

Yes I see what you see using https://lindenbergsoftware.com/google/noto/deva-ardhavisarga.html:

Screen Shot 2020-08-20 at 5 44 54 PM

I think the issue has to do with your code structure. I modified your code and it seems to work just fine:

Screen Shot 2020-08-20 at 5 40 43 PM
nizarsq commented 4 years ago

I used blank fallback font just to make sure browser will not use another fallback font,

punchcutter commented 4 years ago

Both of those are classified as marks in the GDEF so width will get zeroed in some places and not others. They should be changed to GDEF class 1 in the source. I just did it and rebuilt and it looks fine. Glyphs app is classifying them as Spacing Combining marks and nobody changed it.

NorbertLindenberg commented 4 years ago

@nizarsq The modified HTML code nests <th> inside <span>, which isn't valid, and I wouldn't say that it works fine with all the tofu in the rendering.

@punchcutter This sounds reasonable to me. Well, other than the mark-width-zeroing business being entirely unreasonable...

nizarsq commented 4 years ago

@nizarsq The modified HTML code nests <th> inside <span>, which isn't valid, and I wouldn't say that it works fine with all the tofu in the rendering.

@punchcutter This sounds reasonable to me. Well, other than the mark-width-zeroing business being entirely unreasonable...

@NorbertLindenberg Sorry I attached a wrong screenshot. It uses the browser font and that explain the tufo. The is the test case I created

Screen Shot 2020-08-20 at 7 08 05 PM
punchcutter commented 4 years ago

There are actually a few glyphs in here with the wrong GDEF category. And they don't match the GDEF of Sans Devanagari. I can send a PR with fixes.

simoncozens commented 1 year ago

I've fixed this for the presenting glyphs, but if there are others then yes, a PR would be lovely. (It would be easier to compare the GDEFs with Sans if the glyph names were the same, but that's another issue we need to look into...)