How starting "s" can be define so it typed as an alternate instead of space?

Hi, 
I am new to this situation. I included "s" as a contextual alternate but when I check this on Adobe Illustrator and MS Word the starting "s" or newline "s" is typed as normal instead of alternate "s.alt". I think I am missing something. Anyone can help me with this?

Kind Regards
Tanveer

Comments

  • Craig Eliason
    Craig Eliason Posts: 1,436
    What font editor are you using? What does the Feature coding look like?
  • Hi Tanveer, could you copy-paste your calt feature code here?
  • Hi, 
    I am using FontLab 5. The code I am using is written below. Thanks!

    feature aalt{
      feature init;
      feature calt;
    } aalt;

    feature init { 
        sub s by uniE001;
    } init;

    feature calt { 
       sub s by uniE001;
    } calt;

  • Chris Lozos
    Chris Lozos Posts: 1,458
    You need the foot mark, perhaps but do you not also need the space character first to make it the initial s?
  • Craig Eliason
    Craig Eliason Posts: 1,436
    You'll find some helpful info in this old thread.
    I wouldn't use init, and you may have to rewrite your calt coding using "ignore sub." Essentially, it's easier for the renderer to understand where you *don't* want the substitution to take place since it doesn't recognize new lines. So instead of saying "switch only this one and that one," your code will say "except for all of these situations, switch them all."

  • Hi Craig,
    This make sense. Where can I study ignore sub to use it? This may be hard for me as understanding but I will try if this works. 

    Best
    Tanveer
  • Try using this instead:

    feature calt {
       ignore sub @Letters s';
       sub s' by uniE001;
    } calt;

    Defining @Letters is left as an exercise for the reader. Depending on what the alternate looks like, you may or may not want to include things like hyphens in this class.

    I'd get rid of your 'init' feature altogether.
  • Thank you so much André. This really works for me. Cheers!