Greetings,
This is a follow-up of sorts to the question that I posted
last August. Where this time I am stuck getting a substitution to work using symbols that are entirely in the Unicode Private Use Area. I recall that DirectWrite would have problems with text segmentation across scripts. In this case, no script code is applicable, but all symbols are all within the same Unicode block. Is there a
languagesystem code that is appropriate for unknown or undefined script?
The simplest form of the failing substitution under the PUA:
feature rlig {
sub uniE01E uniE0A2 by uniE0C1;
} rlig;
Actually, the substitution
does work in web browsers and LibreOffice, but
not in Microsoft Word (Word for Mac 2021, Windows Word 2019), which is where I need it most. Oddly, Word's "Formats > Fonts > Advanced" Preview pane
will display the correct substitution, it just won't appear in the body of a document as expected.
I've tried a number of variations to no avail, using liga, ccmp, or a codeless glyph like uniE01D_uniE0A2. Is there an OT or Word setting that I could be missing?
A 2nd question while I'm at it... In the above example, for efficiency, I'd like to express a list substitution in the form:
sub @consonants vowelA by @syllablesA;
Where the matching index in
@consonants is used to reference the appropriate element in
@syllablesA , and vowelA does not appear in the output. I haven't found a solution yet. Is this just not a possibility in OpenType?
thank you!
-Daniel
Comments
>Is this just not a possibility in OpenType?
Since you're not editing OTL tables directly, I think that question should really be worded "... using feature syntax FOO".
What you're asking about pertains to ligature substitutions, and for runtime operational reasons the formats are designed to have an array of LigatureSet subtables organized around the first glyph in each substitution. So, in your example, the number of LigatureSet subtables would be the number of glyphs in @consonants. The GSUB table formats don't allow organizing the data around a non-initial glyph in the input sequence.
However, that doesn't mean that font development tools used to describe ligature lookup actions couldn't support expressing actions in the way you're looking for. For example, Microsoft VOLT supports that.
Having no "script" statement present at least allowed the substitution to appear in the "Preview", window so I thought I was on the right track.
The document language is the default en-US, perhaps I need to configure it to use the "Zzzz"?
You haven't mentioned what tools you're using, which could help.
Thanks for correcting me on the script code -FontLab and fontmake didn't produce a warning. They both did produce an error message when I used "dflt". I didn't read error message carefully enough, they both indicate that "DFLT" should be used.
I've tried with DFLT now after reading your reply, and it's back to the behavior where it is broken in Word's Font Format Preview. It seems Preview doesn't want any script setting.
thanks, -Daniel
The "fl" ligature is thrown in as a sanity check to verify that ligatures are otherwise working ok.