For some languages written in the Tamil script, a nukta is needed. Starting with L2/15-256 a nukta was added to the Grantha block at U+1133B COMBINING BINDU BELOW, right next to an existing nukta U+1133C GRANTHA SIGN NUKTA.
I am trying to support at least one of these nuktas in the font Thiruvalluvar (latest builds). Notepad (and Word, both using DirectWrite for shaping) show
while Chrome (and other applications using HarfBuzz, including Edge) show
Both screen shots are from Windows 10 (updated yesterday)
Edition: Windows 10 Pro
Installed on: 2020-09-01
OS build: 19042.844
Experience: Windows Feature Experience Pack 120.2212.551.0
The text is the same in both images. In each line, the text before and after the dash is the same, except U+1133B is used before the dash, U+1133C comes after the dash for the nukta. Code points are (before the dash) for the first line
The shaping with HarfBuzz is perfect. The shaping with DirectWrite has dotted circles, and 1133C does not position, but 1133B seems to do so. Using 1133B produces fewer dotted circles.
I tried creating a ligature (ka_umatra_nukta_virama) as a test case (you can see my efforts commented out) and various substitution features (ccmp, nukt, akhn, calt, rclt, haln) but nothing seemed to work. The ligature for testing was not checked into the repo as it did not work.
Is there something I am missing with the font, or is there an issue with DirectWrite? The OpenType code is at least somewhat correct, as HarffBuzz displays what I want it to display. Both nuktas are listed in Script_Extensions as Grantha,Tamil but have different Script properties (1133B is Inherited, 1133C is Grantha). I wonder if this Script classification accounts for the difference in behaviour between the two nuktas.
The font also has Graphite tables, but they would not have been used in either test case. The two different codepoints do look different, the font supports multiple character variants. This issue is focused on the reordering, substitution, and positioning that DirectWrite is doing (or not doing). Once those items are resolved, I can add the glyph variants to whatever codepoint works best.
The text was updated successfully, but these errors were encountered:
In trying different codepoints to see what might shape correctly, additional codepoints were added. So now there are three different codepoints for the nukta.
U+1133C GRANTHA SIGN NUKTA
U+1133B COMBINING BINDU BELOW
U+0323 COMBINING DOT BELOW
Some of that languages that use this font also need a dot above the text. Visually, the VIRAMA looks like what is desired. However, DirectWrite (and maybe HarfBuzz) do not shape conjuncts well if you have CONSONANT, MATRA, VIRAMA. This is not too surprising, since the VIRAMA is a vowel killer, and why would you have a vowel (the MATRA) and a VIRAMA? In this case, the dot above is another sound. So two other codepoints were added to the font to represent the dot above the text. Thus there are also three options for the dot above
U+0BCD TAMIL SIGN VIRAMA
U+0B82 TAMIL SIGN ANUSVARA
U+0307 COMBINING DOT ABOVE
It seems like the best (but not perfect shaping) is obtained with U+1133B and U+0307.