I’m quite new to glyphs and typography.
I want to design a font where every lowercase letter is connected with a bar (much like in hindi fonts), but the bar can be at a higher and a lower position.
Instead of creating up to 9 contextual variations for every letter I wanted to solve this by inserting a “connector glyph” between every two letters.
I was experimenting with syntax like:
sub a b’ by a con_up_right;
or
sub [a b]’ [a b] by con_up_left [a b];
but I don’t get replacing a glyph with two glyphs to work.
Can you post some sample pics? I’m not sure I understand what you mean by ‘bar’ and ‘at a higher and a lower position’. higher/lower position towards the left side (previous glyph) or the right side (next glyph) or both?
Re first example: sub a b’ by a con_up_right; replaces the b (since it’s the marked glyph name), and the sequence a b will be turned into a a con_up_right. Is that what you want?
Re second example: If you replace a class like [a b], the replacement must be a class of the same size.
This is not true. It is possible to have one-to-many substitutions. But this is not very well supported. I do not think Indesign (at least v5.5) has implemented it for latin fonts.
And you can’t have contextual one-to-many substitution. can do something like this:
sub a by a connector;
sub a connector’ b by con_up_right;
Just checked again. It does indeed work in Indesign CS5.5 and CS6. You need to enable the World Ready Composer in CS5.5 (there is a script to do that. Have a look at this page by Thomas Phinney.
Here are two sample pictures:
(I only started the font yesterday, it’s not so beautiful right now.)
Perhaps I’m on the wrong path.
I know how to do contextual alternatives, but that’d involve creating 3 alternatives for every letter (bar on left side, bar on right side, bar on both sided) and that number would square if I also connect some letters on the bottom line ( “es” for example).
One-to-many substitutions do work in glyphs, but only in noncontextual cases
so: sub a by a xx;#works sub a’ b by a xx;#Error: “Unsupported contextual GSUB replacement sequence”
Also I had a typo in the first post: sub a b’ by a con_up_right;
should be: sub a b’ by a con_up_right;
Could there be another different way to accomplish the same?
Yeah, I thought about two substitutions as well, actually three, since you need to remove the connector again at the end of a word. The substitutions probably need to be in different lookups, i.e. different features or different lookup XXX {…} XXX; blocks.
But one thing you do not need to do in a contextual substitution is repeat the context, i.e. after the keyword ‘by’, you only need to write the letter(s) that replace(s) the letter(s) marked with a straight quote, e.g.
sub a b’ c by b.alt; # no need to repeat a and b
PS: instead of ‘generally’, I guess I should have said ‘technically’.