Need help writing MIF file (AAT)

nickshanks's picture

Hi there, I am trying to implement a generic MIF for my fonts which activates option 14/6 (Typographical Extras/Periods to Ellipsis). I have written the below code which successfully changes the first full stop to an ellipsis, but I have no idea how to change the following two to DELs, can anyone help? (It is originally based on the swash Eva example from Apple's documentation - I realise that it does more than it needs too at the moment, but I'll clean that up later.)

Type	Contextual 
Name Typographic Extras
Namecode 14
Setting Periods to Ellipsis
Settingcode 6
Default yes
Orientation HV
Forward yes
Exclusive no

FS 32

EOT OOB DEL EOL FS
StartText 1 1 1 1 3
StartLine 1 1 1 1 3
Flush 1 1 2 1 2
Saw1 1 2 3 1 4
Saw2 1 2 5 1 6
Saw3 7 7 6 7 7

GoTo Mark? Advance? SubstMark SubstCurrent
1 StartText no yes none none
2 Flush no yes none none
3 Saw1 yes yes none none
4 Saw2 no yes none none
5 Saw2 no yes none none
6 Saw3 no yes none none
7 StartText no yes Ellipsis none

Ellipsis
32 167
bsleeper's picture

Although they can be incredibly powerful, the contextual substitutions in MIF source files are extremely frustrating to write. It's one area where OpenType's approach is easier by many magnitudes.

Fortunately, there's a much easier way to solve your particular problem -- just create a ligature of three periods in a row to an ellipsis character. For example:

 
Type LigatureList
Name Typographical Extras
Namecode 14
Setting Periods to Ellipsis
Settingcode 6
Default no
Orientation H
Forward yes
Exclusive no

List
ellipsis period period period



Although it is not documented Apple's tutorials, you can mix contextual and noncontextual substitutions in any feature set (in this case, Typographical Extras).

Brent

nickshanks's picture

To be honest I had thought of that, but figured an ellipsis wasn't a true ligature so i shouldn't use the ligature feature to cheat my way out :-P

Ahh well...

nickshanks's picture

It also breaks when encountering strings with more than three periods, turning every group of three into an ellipsis, rather than aborting the transformation like a proper contextual substitution would (i.e. "..." would form an ellipsis, but neither "...." nor "......" would).

So I shall use the LigatureList for now, but if anyone can solve this I'd still like to hear about it.

Mark Simonson's picture

This may sound like a stupid question, but why bother replacing three periods with an elipsis? I don't see what the advantage would be since, presumably, it would look exactly like three periods.

hrant's picture

In most fonts an ellipsis isn't identical to three consecutive periods.
And with reason, since that generally creates a large white gap in
the texture of the page.

hhp

Mark Simonson's picture

I've always made them so they look the same as three periods, spacing-wise.

I've just checked a bunch of different fonts at random. Of the ones I looked at (including some from Microsoft, Apple, Font Bureau, House, FontShop, etc.) about half do it the same way I do, i.e., exactly the same as three periods. All the others put more space between the dots in the elipsis. Some as much as twice the space. Interestingly, in Georgia the dots are slightly smaller than the period but spaced exaclty the same as three periods, with a little extra to make up for the smaller dots. I have found no fonts (so far) where the elipsis is more closely spaced than three periods.

hrant's picture

Courier? :-P
Seriously: Maybe you're right.

hhp

charles ellertson's picture

Back when we were writing the Glossary of Typesetting Terms I researched this one a bit. Turns out that (at that time) the Associated Press style was to use three periods with no extra spacing. The Chicago Manual (whatever edition) calle for three periods with a 3-to-em space in between the periods -- of course, Chicago frequently got its "to-em's" a little off; this would give wider than nornal spacing within the ellipsis.

I've been known to argue both sides. Finally our company went with a normal (usually justifying) word space between the periods, on the grounds that the more word spaces you can get in a line, the tighter the line will usually set, and the more even the spacing generally. Not the best argument I've ever offered . . .

We've programmed this "ellipsis" to prohibit a break within of course, and have a high penalty to break before. A four-dot ellipsis is really a sentence-ending period with a standard ellipsis following. One more reason to use the normal space.

MLA style can vary from this, BTW. If it were me & I were building a font with a single ellipsis character, I'd make the space between the dots a bit less than the smallest justifying word space. If someone then decides to go the other route, they just don't use the ellipsis "character." But if you make it a ligature and someone can't turn off that particular ligature without turning off all the ligatures, you do have a problem.

FWIW,

Charles

behnam's picture

Sorry I'm jumping into this discussion but it's so close to what I was looking for for so long.
Can anybody show me how to write MIF contextual table for contextualization of Arabic letters?
Arabic letters are substituted by their 'initial', 'medial' and 'final' forms depending on their location in the word and many of them are joining characters. ftxanalyzer does not generate Arabic contextualization scheme in MIF file and I don't know how to add it to MIF before compiling with ftxenhancer.

Syndicate content Syndicate content