Contextual endings in Illustrator CS4

Stephen Rapp's picture

I've been seeing a change in the way Illustrator handles contextual ending letters and wondered what's different. I used to use a lookup in the calt feature and it would only work with end of words followed by a space. End of lines used to never work because of the nature of text strings.

Here is what I use for a code:

feature calt {
lookup calt_y.end1 {
ignore sub y' @ Letters;
sub y' space by y.end1;
} calt_y.end1;
} calt;

The space character BTW is NOT included in @Letters. Normally the ending y should only be triggered when followed by a space, but for some reason it does this at ends of lines also where there is no space character following. Last year I was doing this in CS4 as well, but there was a software update since then and now it behaves differently. Normally having an ending character at the end of lines and words both wouldn't be a problem, but since its contextual and there are ending swqsh letters in the stylistic sets as well, it makes it harder for a user to sub the swash ends without turning the calt feature off first.

Mark Simonson's picture

Have you tried taking out the "ignore" line?

Stephen Rapp's picture

I will try tomorrow.

It used to work "as is" before, substituting end character only at the end of words followed by a space. This particular font is not mine, but a friend's at American Greetings. I'm helping with code. All my past experience proved futile to get any character to sub at the end of a line contextually. Now suddenly its doing it when I don't expect it. Another font that I did digitize for her last year is now behaving that same way in Illustrator but didn't before.

My understanding was that because of the nature of a text string there was no way to get the font to recognize contextually that its the end of a line.

andi aw masry's picture

Hi, glad to know you.

I've handled this kind problem with cswh features as follow:

    lookup cswh10 {
      ignore sub @fina1' [@letter_define];
      sub @fina1' by @fina2;

    } cswh10;

@fina2 is a class where the endings were placed.

So far this works fine in Indesign, but I'm not yet sure if this fiture can generally be accessed in several other software which supporting OT

Best regards.
awm

Eimantas Paškonis's picture

I'm also having the same problem with desired swash NOT showing up at the end of the string.

It seems Illustrator reads end of the text string as "space".
So I used:

ignore sub @ending @letter;
ignore sub @ending space @letter;
sub @letter' space by @ending;
sub @letter by @ending;

But now I get swashes at the end of EVERY line.
And I don't understand the solution stated here... :(

daverowland's picture

@ Minerva

you need to put apostrophes in the ignore sub as well as the sub, but I'm not sure what you're trying to achieve with the second ignore substitution - looks like you don't want the @letter to change to an @ending AFTER a space, but it should be the opposite - you want it to replace BEFORE a space.

@ Stephen

Is there a reason you would only want it to change to an endform before a space? Why not have endforms at the ends of lines, before punctuation etc etc. That'd be easy, because you'd just get rid of the space from sub y' space by y.end1;

Eimantas Paškonis's picture

Yeah, I had apostrophes at the actual code, just messed things here.
In short, I want swashes only to appear at the end of the text string.

ignore sub @ending' @letter;
ignore sub @ending' space;
sub @ending' by @ending.swash;
(This gives swashes in FL, but not in Ai.)

ignore sub @ending' @letter;
ignore sub @ending' space @letter;
sub @ending' by @ending.swash;
(This gives the same swashes in FL + swashes at the end of ALL lines in Ai.

And I need only 1 swash at the end of the text.

Eimantas Paškonis's picture

I'm bumping this thread a bit because this issue is the last one before I can release my typeface.

Thomas Phinney's picture

I thought you wanted swashes at the end of all lines. Are you saying (Aug 5) that you only want a swash at the end of the whole paragraph?

T

Thomas Phinney's picture

I don't think you can do that in OpenType today. Sorry.

Unless of course the layout engines allow the hard return character to participate in OpenType shaping. But I'd be surprised if that was normal/common behavior across layout engines. But even that wouldn't be enough, if you want the feature to also work when the end of paragraph is also the end of the document or text block... you'd need to be able to detect app-inserted soft returns as well, which seems even more unlikely.

If my belief above is correct, it would take very active application support to make such a feature work, because only the application knows whether the last character on the line is the end of just the line, or the end of the paragraph. The regular OpenType contextual workings aren't enough to handle that.

Regards,

T

Eimantas Paškonis's picture

One solution would be swashes activated by period. But that may confuse users.

Syndicate content Syndicate content