long s substitution??

polenimschaufenster
23.Sep.2005 12.23pm
polenimschaufenster's picture

Hi!

Im working on a distressed font based on
characters from an ancient tombstone for my diploma.

Does anyone have tips on how to implement
conextually glyph substitution for long s?

Id like to have it done automatically but there are
just too many exceptions to the rules and im quite
new to opentype programming, so maybe i'd just
stick with including it as a special character which
can be accessed via glyph pallette?

what do you think?

thanks a lot, this forum has already been extremely useful!
hannes.

I think Adam Twardoch answers the problems to this quite well in an old thread on a similar topic.


Should be a pretty simple OT feature:
Make "tall s" the s in your font. (Mapped to lowercase s.)
Create a new glyph using the "regular s" and call it "s.alt".
Create a class with space, all punctuation, and "s".
Whenever "s" is followed by your class, use "s.alt".


As explained by Adam (and as we found in our own research), it isn't that simple. The correct usage of the long s varies by location and time. Chester's code example would work well enough for latter-day English usage of the long s, though.

T


Chester's advice is good.
Or do it the other way round --

Glyph names: "s" remains the round/end s and "longs" is the long s.
Define a class containing all lowercase (ligatures included), say @LC_for_longs.

Make a "hist" feature with a contextual substitution:
sub s' @LC_for_longs by longs;

This means: Long s replaces normal s only if another lowercase follows. Not so if any other letter (uppercase, punctuation & spaces included) follows. Same result as with Chester's sample, but it's easier to collect lowercase than all possible exceptions (like quotation marks &c).
Moreover, you can also use the font without long s. E.g. if the app doesn't support any features.

Works well for English which has very simple long s rules: always except at the end of a word.
For German, you create a paragraph style with this feature switched on, and create a character style with this feature switched off. Then go through your text manually to apply the character style to normal s's that should be round/end s ...

Karsten


thanks for all the posts,
I think I'll stick with Karstens method,
it seems to work pretty well!

thanks again!
hannes


Indeed, my feature is very simple, and is meant to be used for English. Karsten is your man for OpenType coding; he takes a great deal of care in making his types so that they can be beautifully set in many languages and idioms. Hi Litteratra typeface is bursting with alternates, ligatures, contextual alternates and contextual positioning options. (He uses Stylistic Sets very well.)


well, I still seem to have some problems.

In fontlab the hist feature works well,
in IndesignCS2 it doesnt seem to work at all,
contextual substitution and ligatures work well.

I only have the three features

liga
calt
hist

and somehow the hist feature gets lost
in indesign?

greetigs and thanks,
hannes.


InDesign doesn't support the hist feature by any type of automatic substitution. See page 14 of Adobe's OT User's Guide for a list of currently supported features.


I see, so which feature is most useful to implement long_s substitution?

should I just go with contextual alternates?

thanks,
hannes.


You could do contextual alternates, but that is ON by default, so you have to want the feature to be ON unless you specifically turn it OFF. What you should do (in any event) is duplicate that hist feature and have the second version as "ss01": you'll be able to turn the feature ON using InDesign, which supports Stylistic Sets. If you also want to use the feature in Illustrator, you might consider making it a "titl": Titling Alternates.

It's annoying that Adobe released a generation of products together as Creative Suite 2, but that they all have different type handling. I hope that they get their act together in the next version and all play nice and adopt the InDesign model.

FYI, I have posted screengrabs of CS2's OpenType "interfaces" here:
http://vllg.com/files/cs2/


Sorry yes, I forgot to mention that ID doesn't support hist ...
As Chester said, mirroring unsupported features (ornm is
another one) in an ssXX helps.

If it shall work in old ID (non-CS) 2 or other apps too,
you need to use one of the standard features indeed.
ID CS2 is the only application so far which supports ssXX
features.
Which one, depends --
maybe not liga as you type might have ligatures,
maybe not dlig as your type might have abbreviations,
&c
-- titling is really a good choice!

Karsten


thanks!

Titling seems to be the right descision, that way I can also avoid any problems between the contextual subs and the long s sub.

works well!

thanks for your help again!