Contextual swashes for beginnings.

Primary tabs

16 posts / 0 new
Last post
Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
Contextual swashes for beginnings.
0

I'm programming contextual swashes for the beginning and endings of my script face I'm working on and I'm using the info in the fontlab manual. I tried the ending swashes script and it worked fine. The beginning script that I copied directly from the manual doesn't work. Is there a way to make this happen? As you can see from the screen capture the beginnings are being replaced for every letter even though I have an ignore substitute scripted in.

Laura Worthington's picture
Joined: 3 Jan 2010 - 2:33pm
0

Hello everyone! I need some help with this too. I think I'm on the right track but something's missing in my beginnings & endings. I have the exact feature set up that Karsten posted above, so the problem must be in how I have my classes set up, as shown below:

@letter_start: t t.start
@start: t
@start_swash: t.start
@letter_end: t t.end
@end: t
@end_swash: t.end

Thanks! :)

~ Laura

Elena Albertoni's picture
Offline
Joined: 25 Mar 2004 - 4:32am
0

Hi,
I think you should include the swash glyphs in your ignore string:

ignore sub [@letter @start_swash] @start';

to make it work.

Elena Albertoni's picture
Offline
Joined: 25 Mar 2004 - 4:32am
0

Ah, most important, you have to define the context! It's not enough to put the apostroph ;)

ignore [@letter @start_swash] @letter';
sub @letter' @letter by @start_swash;

for example...

Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
0

That didn't work, it gave me error messages, but thanks for trying! : ) Waaaaa.

paul d hunt's picture
Offline
Joined: 5 May 2005 - 8:44pm
0

try this

swsh {
ignore sub @ALL @swsh1';
sub @swsh1' by @swsh2;
} swsh;

where

@ALL = All letters and punctuation
@swsh1 = The letters you want to be replaced by swashes
@swsh2 = swash variants

Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
0

I just got a reply from fontlab and this is what they said:

"I'm puzzled. It should work but doesn't. I'll do some more tests."
Adam Twardoch
Fontlab Ltd.

So I guess the code isn't the problem.

Miguel Sousa's picture
Offline
Joined: 18 May 2003 - 8:30pm
0

Have you tried renaming your classes?
I know this suggestion might sound silly, but you never know...

One other thing, have you tried generating a font and test it in InDesign, for example? Does it work?

Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
0

I tried renaming the classes and that didn't do anything. I also tested the font in Illustrator CS2 and it did exactly what it does in the fontlab ot preview panel.

paul d hunt's picture
Offline
Joined: 5 May 2005 - 8:44pm
0

as you have things set up now, you need to include all your x.start letters in your @letter class. sorry i didn't make this note earlier (i missed the jpg image somehow)

Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
0

Thanks Paul! The beggining are working. The only problem is that now the endings aren't working. It's like if one works it cancels out the other one or maybe I should change the code. Here's a capture of what's happening now: http://www.bvfonts.com/livejournal/begins.gif

Karsten Luecke's picture
Offline
Joined: 6 Aug 2005 - 8:41am
0

Maybe the first ignore also prevents the end-swash substitution. By defining separate lookups, you also define the boundaries for each "ignore" (only valid within the lookup in which it was defined).

feature calt (

lookup caltstart (
   ignore sub @letter_start @start';
   sub @start' by @start_swash;
) caltstart;

lookup caltend (
   ignore sub @end' @letter_end;
   sub @end' by @end_swash;
) caltend;

) calt;

Mr Hunt's suggestion to include X.start glyphs in the @letter class may also applies for X.end glyph substitution.
Either you include X.end glyphs in @letter too. Or you create separate context-classes for caltstart lookup (including a-z and a.start-z.start) and for caltend lookup (including a-z and a.end-z.end); I indicated this by adding "_start" and "_end" to "@letter" in the sample above. Both may result different substitution behavior with one/two-letter-words, so you should try both ways and see which looks better.

paul d hunt's picture
Offline
Joined: 5 May 2005 - 8:44pm
0

i believe karsten is correct. you need a separate lookup for your starts and for your finishes.

Jess Latham's picture
Offline
Joined: 23 Jan 2004 - 6:11pm
0

That was it! Thanks Paul and Karsten! There was one small thing that needed changing. Instead of ( ) it needed to be changed to { } on your code.

paul d hunt's picture
Offline
Joined: 5 May 2005 - 8:44pm
0

it seems you got everything figured out. Congratulations on Eye Catching, it looks great!

Göran Söderström's picture
Joined: 15 Feb 2006 - 2:53am
0

/track/