New to Typophile? Accounts are free, and easy to set up.
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.
| Attachment | Size |
|---|---|
| cswh.jpg | 167.4 KB |
11 May 2006 — 8:37am
Hi,
I think you should include the swash glyphs in your ignore string:
ignore sub [@letter @start_swash] @start';
to make it work.
11 May 2006 — 9:04am
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...
11 May 2006 — 9:18am
That didn't work, it gave me error messages, but thanks for trying! : ) Waaaaa.
11 May 2006 — 9:41am
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
11 May 2006 — 11:31am
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.
11 May 2006 — 4:52pm
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?
11 May 2006 — 7:27pm
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.
15 May 2006 — 10:19pm
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)
16 May 2006 — 8:37pm
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
17 May 2006 — 3:46am
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.
17 May 2006 — 7:53am
i believe karsten is correct. you need a separate lookup for your starts and for your finishes.
17 May 2006 — 10:54am
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.
14 Jun 2006 — 4:46pm
it seems you got everything figured out. Congratulations on Eye Catching, it looks great!
5 Mar 2007 — 1:42pm
/track/
30 Oct 2010 — 6:20pm
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