Fina & end Opentype features

JoanAlegret's picture

Hi, everyone,

I'm working on understand the terrible and heavy world of some (and just some of them) Opentype features. And the most disturbance thing which I haven't understand already is the exception that makes possible to the "end" feature (in some of the Stylistic set) to work only in the last character, not in the middle of the word. After that, I discovered the *fina feature, I don't understand how it works, but it does what I was looking for. But at there are just eight fonts with that feature, is not very common. Isn't it? Why?

So, looking inside other fonts, like Minion. I've seen that it doesn't use the fina feature. It uses a combination between classes. Just that? The "space" character is included in the class, but how it works? Where's the script that allows that?

In basic script some options would be (without classes)

This is what it would not work:

feature ss01 {
sub e by e.end;
} ss01;

The way that I've thought to work with some characters:

feature ss01 {
sub e space by e.end;
sub e period by e.end;
} ss01;

Obviosusly I'm sure that it's not the way to do it. (It would be a lot of unnecesary work)

Any idea?

blank's picture

End is not an OpenType feature, it is just an suffix used in whatever example you saw. Minion probably uses CALT rather than FINA because only five applications even support FINA. Doing this with CALT checks to see if any glyph in (class of glyphs with terminal forms) is to the left of (class of glyphs that are spaces or certain punctuation marks) and if so, swap in the .end form of the letter.

Khaled Hosny's picture

fina feature is generally used in Arabic and similar scripts and the Engines does the word analysis needed to determine where to apply it (in Arabic final forms can occur in the middle of the word), so it is implemented in the font as simple substitution lookup.

Some engines (Adobe's only, I think) support in other scripts to mean end of the word, and the engine still have to do the word analysis. Some consider this an abuse as you can't then use it to mean end of word in Arabic which have it legitimate uses apart from the current use of fina in Arabic script, a different feature should have been added for that.

Since the use of fina in Latin script not supported by most engines, fonts do use a bit more complex calt rules to implement it, searching typophile you should find several threads discussing this.

Bendy's picture

If fina is partially supported, should we put any final forms in ss01 and then call ss01 from the fina feature for full compatibility?

blank's picture

I wouldn’t bother with stylistic sets for the purpose of compatibility because they are also poorly supported. And end users are usually clueless about how stylistic sets work. I dealt with this in a recent font by calling all positional forms from AALT so that they can be accessed in any application with a glyph palette. Of course, that does not solve the problem in crap software like Photoshop that has no glyph palette for using AALT, but it’s all I can really do.

JoanAlegret's picture

Thank you guys!

After taking a look to the Adobe OT feature spec:

I made classes for every alternate characters, and then use the ignore script.

Something like this with the swashes feature:
For example M has a swash for beginnings on the left. To avoid the cross with the right swash of Q in uppercase words and also to make M.swsh only shown in beginnings, I wrote:

feature swsh { # Swashes
ignore sub @allswsh @swshl01';
sub @swshr01' by @swshr02;
sub @swshl01' by @swshl02;
} swsh;

Q is in swshr01 / Q.swsh is in swshr02
M is in swshl.01 / M.swsh is in swshl.02

While uppercase, lowercase, numbers and other characters are in allswsh class.

It works fine for me, some better ideas?

Thanks again

Syndicate content Syndicate content