How to substitute a character with a diacritic only when it's preceded by an another character?

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
Fyteria
Posts: 1
Joined: Sat Sep 28, 2024 10:11 am

How to substitute a character with a diacritic only when it's preceded by an another character?

Post by Fyteria »

I'm making a font for my conscript. I've made some ligatures for syllables. Vowels can be represented either by symbols or diacritics:
FontCreator_FtcbP7jfPY.png
FontCreator_FtcbP7jfPY.png (6.17 KiB) Viewed 259 times
Symbol and diacritic on the left is for vowel a, while on the right is for vowel e.
I want to make a substitution rule, where the vowel symbols would turn into diacritics only when they're preceded by a syllable (e.g. pa (syllable) + a (symbol) = paa (syllable + diacritic). I tried doing this with single and multiple substitutions, but it affects even isolated and initial states of these symbols, I don't want that.
FontCreator_JmyYlv8S3w.png
FontCreator_JmyYlv8S3w.png (12.86 KiB) Viewed 259 times
FontCreator_ElZlPIVtSt.png
FontCreator_ElZlPIVtSt.png (12.14 KiB) Viewed 259 times
Such symbols should turn into diacritics only once and only if they're preceded by a syllable.
FontCreator_nPo9L6CmSk.png
FontCreator_nPo9L6CmSk.png (21.91 KiB) Viewed 217 times
FontCreator_PKXdW8rlJ5.png
FontCreator_PKXdW8rlJ5.png (3.63 KiB) Viewed 259 times
Currently, it looks like this (screenshot above).
Erwin Denissen
Moderator
Moderator
Posts: 11419
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: How to substitute a character with a diacritic only when it's preceded by an another character?

Post by Erwin Denissen »

You will need a contextual lookup. See the Swashes for an example:

Enrich Your Fonts with OpenType Features
Erwin Denissen
High-Logic
Proven Font Technology
Post Reply