OT language specific ligatures

seanos's picture

I’m hoping someone can point me in the direction of some syntax examples for implementing language-specific ligatures. I’m not completely clueless, but I’ve yet to find anything that’s entirely clear to me either.

The reason: I’ve been looking at some free fonts which look promising, but they implement some ligatures that are only appropriate in French (ae -> æ, oe -> œ). Seeing words like dœs and shœs (or Gæilge) is a little disconcerting. I’d like to corral these, though I suppose I could also just delete them.

The problem table seems to be this...

feature rlig { # Required Ligatures
 # Latin
    sub A E by AE;
    sub A e by AE;
    sub O E by OE;
    sub O e by OE;
    sub a e by ae;
    sub o e by oe;
 script DFLT;
    sub A E by AE;
    sub A e by AE;
    sub O E by OE;
    sub O e by OE;
    sub a e by ae;
    sub o e by oe;
} rlig;

By looking at other fonts it seems that I would need to define languages somewhere by script, but it’s not clear where you would do that (ccmp table?).

Nick Shinn's picture

Use the "locl" feature.
There have been a number of threads at Typophile about the “fi” ligature in Turkish, which might help you understand the issue and method.

Michel Boyer's picture

o_e should not be treated as a ligature in French. The French words "coefficient", "moelle" and generally words for which the o and e are pronounced separately do not give rise to œ. It is the spell checker that replaces oe by œ in œil, œuf, bœuf, etc. If you implement the ligature oe in the font, you will get "cœfficient", "mœlle" etc. which are plainly wrong.

blokland's picture

When a-e, o-e, i-j combinations are not diphthongs, they should not be treated as such. I reckon that this was the reason that the ‘dpng’ tag was deprecated from the 1.25 version of the OT specification.

FEB

blokland's picture

I’m far from an expert, but the choice of the ‘rlig’ feature tag surprises me a bit in this case.

Tag: ‘rlig’
Friendly name: Required Ligatures
Registered by: Microsoft
[…]
Script/language sensitivity: Applies to Arabic and Syriac. May apply to some other scripts.
[…]

FEB

Té Rowan's picture

Hoo-boy! All I did to work around this particular problem was to make that 'rlig' apply only to 'latn'/'FRA ', which, IIRC, is the setting for French.

blokland's picture

Reynir: ‘All I did to work around this particular problem […]

Ah, circumventing problems to create new ones. Nice ;-)

FEB

Té Rowan's picture

Since I make these changes for personal use only, these are problems that will not appear to me.

John Hudson's picture

All I did to work around this particular problem was to make that 'rlig' apply only to 'latn'/'FRA

But as Michel points out, not every occurrence of ae and oe in French is equivalent to æ and œ. These are not glyph display distinctions, they are spelling distinctions, and hence properly made at the character encoding level, not the GSUB level.

seanos's picture

Ah, the joy of opposing timezones.

I did find what I was looking for late yesterday (Adobe: OpenType Feature File Specification).

My quick solution was to move this stuff to the end of liga in their own block...

 language FRA; # French
lookup liga10 {
    sub A E by AE;
    sub A e by AE;
    sub O E by OE;
    sub O e by OE;
    sub a e by ae;
    sub o e by oe;
} liga10;

...but it did seem unlikely to me that this was the usual thing to do for French, so removing it altogether is probably the best solution.

May apply to some other scripts.

Well it certainly seems to apply to text marked up as English and Irish in Webkit and on my Nook!

Use the "locl" feature.
There have been a number of threads at Typophile about the “fi” ligature in Turkish, which might help you understand the issue and method.

I don’t think locl is appropriate here, but it would certainly be easy to allow for Turkish while I’m editing the liga feature. These fonts already have fi & ffi in a separate block to fl, ffl & ff so it should be simply a matter of putting in something like...

 language TRK  exclude_dflt; # Turkish
lookup liga1; # fl ffl ff

...before...

 script dflt;
lookup liga0; # fi ffi
lookup liga1; # fl ffl ff

Another useful reference: Adobe: OT Feature Tags

charles ellertson's picture

Just a note -- unless your font has all the characters needed for Turkish, it seems silly to exclude the f_i ligatures with a language tag. There were literally hundreds of fonts with that exclusion in {liga} that also lacked the dotted capital I. How would you set Turkish with such a font?

Té Rowan's picture

Incidentally, my simplistic solution works for me, if only because I'm not a Francophone and never set text in French and very rarely read any – and then only on newspaper sites.

seanos's picture

unless your font has all the characters needed for Turkish, it seems silly to exclude the f_i ligatures with a language tag....How would you set Turkish with such a font?

That is a good point...you wouldn’t use them for Turkish of course. On the other hand, since these are fonts that can be freely modified I don’t see how it causes any problems to nudge them in the general direction of Turkish compatibility. In fact, if some other font was providing the missing fallback characters it could still make things a little less confusing.

Whatever the practical implications, it has resulting in my learning a little syntax, so it was worthwhile for me!

charles ellertson's picture

Sure, you could set a regular capital I with the combining diacritic, U+0307 -- oh, wait, Baskervald, like so many other fonts, doesn't include any combining diacriticals...

blokland's picture

… and in the free book The Hound of the Baskervalds the dog is missing.

FEB

charles ellertson's picture

… and in the free book The Hound of the Baskervalds the dog is missing.

What a silly thing to say.

Changing the topic from books to type, in the for money fonts, say, oh, from Adobe, there aren't any combining diacriticals there, either. Show me an Adobe font that has all -- or even some -- of the characters from 0300 to 036F. Less sure about the fonts from the Monotype conglomeration, but I'd bet it is similar. And include FontFont.

I don't know about DTL. Wonderfully drawn fonts. I wish my customers (the 100 or so publishers in the Association of American University Presses) could afford them. I'm not being snide, I really would like to work with these fonts, as I think they would print (ink on paper) so much better than most of what is used. But I argue in vain, the annual font budget for most presses isn't large enough to buy even one DTL family. And designers have their quirks too, many would rather save up & buy the new display font of the year...

Try offering an educational discount to, say, the University of Chicago Press. I'll broker the deal for free just to have the privilege of working with DTL fonts.

Given my customers can't afford DTL fonts my question is moot, but just out of curiosity, how many of them have populated the combining diacritics? How many languages can you cover? Romanized Arabic? Romanized Indic Scripts? The major (non-European) languages used in Africa? Native American languages, where "American" covers North, Central and South America?

It isn't just the little, unimportant people of those countries involved. Western Europe is full of ex-colonial powers, and as they run out of topics such as how many petticoats George Sand might have worn, had she worn petticoats, they turn to the history of those colonial days...

Actually, it is in the OpenSource fonts where attention is paid to combining diacriticals and support is given to the languages that require them.

Remember, the Unicode Consortium said Gosh darn it golly gee whiz (or words to that effect), we're not going to keep assigning codepoints for accented Latin glyphs. The proper way to render such glyphs is to use a base character and a (or series of) combining diacritical(s). Which makes perfect sense. If you go read the section on combining diacritics in the Unicode Standard, everything is provided for. Now if only the font publishers would comply...

blokland's picture

Charles: ‘What a silly thing to say.

You mean that the dog isn’t missing?

Thank you for the compliment regarding DTL fonts and your offer to recommend them at the American University Presses. Actually we feel perfectly happy with our niche market and the subsequent exclusivity of our fonts (or vice versa).

Concerning script coverage and combining diacritics, or whatever, we are capable of delivering anything in case of requests.

FEB

charles ellertson's picture

we are capable of delivering anything in case of requests.

Ah, yes, I believe I've head about such places... "What ever the gentleman desires and can afford can be provided." I hope in these days of gender equality the same is offered to women?

As with all too may things, it's all academic to me, but I understand that establishments of the highest caliber within this niche do not make snide remarks about members of another niche, where such things are provided without monetary compensation...

blokland's picture

Charles: ‘Ah, yes, I believe I've head about such places... "What ever the gentleman desires and can afford can be provided."

What a rude thing to say.

Sadly, this can only lead to one conclusion, I reckon (quoting Gabrielle):

[…]
Time to turn the pages time to start anew
I know that I can do it, I can do it without you
Our love is over, our love is over

[…]

FEB

Syndicate content Syndicate content