calt substitution problem #4050
-
I’m not sure if this qualifies as a bug report yet; so discussing here first. I have a contextual substitution which replaces lookup calt_dot_reph {
sub r3cil' [... l3l3 ...] by dotreph; #full list of context glyphs can be found in otf
} calt_dot_reph;
hb-shape --font-file RIT-Rachana-Regular.otf "ര്ല്ല" #r3 xx zwj l3 xx l3 → r3cil l3l3 → dotreph l3l3
[dotreph=0+0|l3l3=3+1450] but hb-view --font-file RIT-Rachana-Regular.otf "ര്ല്ല" -o /tmp/hb-test.png #expects dot reph above l3l3 Actual result:Expected result:Font: What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
The glyphs is there but too far to the left, and hb-view bounds calculation misses this. Try:
If mark attachment should happen here, for some reason it isn’t working. |
Beta Was this translation helpful? Give feedback.
-
It isn’t working because If the text follows Unicode’s recommendation, this font works: $ hb-shape RIT-Rachana-Regular.otf -u '0D4E 0D32 0D4D 0D32'
[l3l3=0+1450|dotreph=0@196,0+0] |
Beta Was this translation helpful? Give feedback.
-
Try this (untested) lookup KILL_l3l3 {
sub l3l3 by NULL;
} KILL_l3l3;
sub r3cil' lookup REMOVE_l3l3 lookup REORDER_reph_l3l3 l3l3' lookup KILL_l3l3 ; |
Beta Was this translation helpful? Give feedback.
It isn’t working because
dotreph
is not being reordered towards the end of the syllable. That is because HarfBuzz doesn’t recognize it as a reph. The reph should be encoded as U+0D4E MALAYALAM LETTER DOT REPH, not as <U+0D30, U+0D4D, U+200D>. The Unicode Standard, version 15.0, chapter 12 says “The sequence <ra, virama, ZWJ> is not used to represent the dot reph, because that sequence has considerable preexisting usage to represent the chillu form of ra, prior to the encoding of the chillu form as a distinct character, U+0D7C U+0D7C MALAYALAM LETTER CHILLU RR.”If the text follows Unicode’s recommendation, this font works: