notofonts / balinese

Noto Balinese
SIL Open Font License 1.1
4 stars 2 forks source link

Characters overlap in Sans: ᬤᬾᬦ᭄ᬧᬲᬃ #33

Closed NorbertLindenberg closed 1 year ago

NorbertLindenberg commented 1 year ago

In Noto Sans Balinese, the ◌᭄ᬧ and ᬲᬃ of ᬤᬾᬦ᭄ᬧᬲᬃ (the name of the capital of Bali, Denpasar) overlap. In Noto Serif Balinese, the problem does not occur.

Font

NotoSansBalinese-Regular.ttf

Where the font came from, and when

GitHub release Date: 2023-01-10

Font Version

Version 2.004; ttfautohint (v1.8.4.7-5d5b)

OS name and version

macOS 12.6.7

Application name and version

Safari 16.5.1 Firefox 114.0.2 Brave 1.52.126

Issue

Go to https://lontar.eu/google/noto/denpasar.html. Compare the Sans and Serif renderings.

Character data

ᬤᬾᬦ᭄ᬧᬲᬃ

Screenshot

Screen Shot 2023-06-26 at 20 28 12
simoncozens commented 1 year ago

There's been some change, either in the toolchain or in Harfbuzz's USE implementation, whereby glyphs with mark category in GDEF but with horizontal advance in the hmtx table, are being zeroed when they weren't being zeroed before, which is producing this and all kinds of other similar issues.

NorbertLindenberg commented 1 year ago

The problem occurs in Safari and other CoreText-based apps, so not specific to HarfBuzz.

You're probably aware of this "feature" of USE?

An important OT technique for excluding certain base glyphs from contextual lookups is to classify the base glyph as a mark in the font's GDEF table, since marks can be selectively included or omitted from OT processing. However, whenever this technique is used, the width of the base glyph must be added back using the 'dist' feature. This is necessary because OT processing cancels the width associated with a mark. It is necessary to cancel the width of a non-spacing mark because it is not clear where to apply the width of a non-spacing mark during OpenType processing.

A typical use case of this is Javanese which has prebase vowels. Since the prebase vowels do not reorder until after basic cluster formation, they are present in their logical position. This may interrupt other contextual substitutions. If the vowels are treated as marks, they can be excluded from OT context, and thus reduce the number of contextual rules required for processing. Consequently the expected width of the prebase vowels may be restored with the dist feature, for example (in VOLT OT Language) [...]

simoncozens commented 1 year ago

I'm just gonna make it a base. I don't think there are other interactions I need to worry about for this conjunct.