- Handwriting cursive font with 3 sets of alternates, separated into vowels and consonants.
- /space is made to be ignored when substituting, so that it can go con0-con1-space-con2 etc.
- The code (for consonants) looks like this (@etc contains all the non-alternating symbols like /space or /period):
<p><b>sub</b> @con0 @con0' <b>by</b> @con1;</p><p><br></p><p><b>sub</b> @con1 @con0' <b>by</b> @con2;</p>
<p><b>sub</b> @con0 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con1;</p>
<p><b>sub</b> @con1 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con2;</p>
<p><b>sub</b> @con0 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con1;</p>
<p><b>sub</b> @con1 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con2;</p>
<p><b>sub</b> @con0 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con1;</p>
<p><b>sub</b> @con1 <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> <b>[</b>@vow0 @vow1 @vow2 @etc<b>]</b> @con0' <b>by</b> @con2;</p>
- Everything works in apps but not when testing font online. I test it at http://www.impallari.com/testing/index.php. Pinging @pabloimpallari
- For some reason substitution gets interrupted by /space. So it goes con0-con1-space-con0. Every word starts with the default set (con0/vow0).
- There's also a substitution for "oldstyle" /d. Don't judge – I have to mimic the handwriting. Most of the time it uses this:
sub d' space by d_old;
- And once again – it works in apps, but not online. What happens is this:
- If string is "@letter /d" – it doesn't change
- If string is "@letter /d /space" - it does change
- If string is "@letter /d /space @letter" - it does not change
Comments
There are many more layout engine differences and/or issues related to OpenType layout features; probably too much to document, but we have some on file here.
Firefox is weird. It does activate /d substitution but has the "every word starts with default set" problem as Chrome.
There's another weird thing. The code for /d substitution lookup (I have it named "d_old" and not "d.old" due to sorting):
The /d in "and" gets substituted while /d in "bad" does not. Apparently Chrome processes only the vowel-consonant line. However, if I put non-space character after the "bad", /d gets replaced.
All in all, there's something weird going on with Chrome's /space character.
Changing it violates text, why is this practice even contemplated by layout programmers?
There's quite a lot of processes in which Unicode characters are replaced, decomposed, or combined in a buffered state as part of layout and display of text. The buffered state means that the underlying text of the document is not being changed, and the character processing is happening only for layout and display purposes. In some cases, Unicode actually expects such processes to be performed, e.g. splitting of two-part vowels signs for Indic scripts.
Obviously, though, character processing that actually breaks or inhibits correct layout for subsequent glyph processing isn't helpful.
Update
This is how it looks in Chrome:And this is how it looks in Safari (as intended):
I had filed a bug report and got feedback from Chrome devs:
Thanks for the report. Chrome currently segments text on space by default for performance reasons.
Adding "text-rendering: optimizeLegibility;" disables that and us render the text as expected.
We're currently in the process of changing our line layout implementation and that work will fix this without the need for any extra css properties.
Until then though hopefully the workaround suggested above is sufficient for your use case.
It fixes the caps and SS reset but not /d-space substitution.