opentype compatibility

oogby's picture

Hi everybody,

I'm kind of stumped on a technical issue here, and was wodering if anybody could help.

I'm trying to wrap up my first font, and it has some alternates, like so:

feature calt {
sub [fshort lshort] l' [b f h k l] by l;
sub [fshort lshort] f' [b f h k l] by f;

sub l' [b f h k l] by lshort;
sub f' [b f h k l] by fshort;

} calt;

It also has some oldstyle numerals:

feature onum {
sub zero by zero.onum;
sub one by one.onum;
sub two by two.onum;
sub three by three.onum;
sub four by four.onum;
sub five by five.onum;
sub six by six.onum;
sub seven by seven.onum;
sub eight by eight.onum;
sub nine by nine.onum;
} onum;

When I test my font in Illustrator CS3 at home, it works file; I can use the OpenType panel to use my alternates, and when I select Proportional Oldstyle I get my oldstyle numerals.

But, in Illustrator CS at work, the alternates button is disabled and selecting different figure options doesn't do anything.

I'm using FontLab Studio 5.0.2 for Windows, if that's important.

Any thoughts?

Thomas Phinney's picture

It's kind of tangential, but I don't understand the first two lines of your 'calt' code - looks like you're substituting a glyph with itself for both l and f. Whassup with that?

Cheers,

T

oogby's picture

Hi Tom,

I don't entirely understand that myself.

If you hop on over to http://pics.livejournal.com/oogby/pic/0000x4bw/ , you'll see what the alternates do: they shorten f's and l's when they're followed by a lowercase letter with an ascender.

On the word 'wallflower', the 'llfl' bit goes short-normal-short-normal, which I think is pretty spiffy. Without those first two lines, it's short-short-short-normal in FontLab, which looked kind of funny to me.

Though... I just tested that in Illustrator CS3, and it's doing the short-short-short-normal thing. I'll have to fix that...

charles ellertson's picture

It's a bit picky & doesn't address you problem, but your alternate glyphs should be .short -- as in l.short and f.short.

As to the behavior of CS opposed to CS3, Does CS support OpenType?

Thomas Phinney's picture

AFAIK, Illustrator CS and CS3 have essentially the same OpenType support. Mind you, there will have been some bugs fixed in there somewhere.

I understand the net effect of the code, but the first two lines of substitutions take l and f and replace them with themselves. In any case, the latter two lines are completely adequate to achieve the desired effect if you just want the letter styles to alternate. If you wanted to get the shortened form to repeat, then you would need to chain the letters or write the code differently.

Cheers,

T

oogby's picture

Thanks for the tips.

Seems I've found an odd quirk of FontLab, though I should really get the latest patch and see if that changes things.

I'll have to remove those lines tonight and see if if behaves differently in Illustrator than it does in FontLab.

oogby's picture

To continue on the tangent...

I tried removing the odd calt lines, and it's not alternating in Illustrator (or Fontlab anymore). Bummer. I should probably read more about how this stuff works.

But, I finally requested the 5.0.4 patch, so maybe that will make FontLab and Illustrator behave consistently, at least.

oogby's picture

Well, if anybody's curious, I seem to have solved my alternation problem like this, after having discovered the existence of 'ignore' statements:

feature calt {
ignore substitute [l.short f.short] l' [b f h k l];

substitute l' [b f h k l] by l.short;
substitute f' [b f h k l] by f.short;
} calt;

Still no lock with Illustrator CS though.

oogby's picture

I finally got around to testing this on a different computer with Illustrator CS installed, and got the same problem I had originally. Here's my current code:

feature calt {
ignore substitute [l.short f.short] l' [b f h k l];
substitute l' [b f h k l] by l.short;
substitute f' [b f h k l] by f.short;
} calt;

feature onum {
sub zero by zero.onum;
sub one by one.onum;
sub two by two.onum;
sub three by three.onum;
sub four by four.onum;
sub five by five.onum;
sub six by six.onum;
sub seven by seven.onum;
sub eight by eight.onum;
sub nine by nine.onum;
} onum;

Any thoughts?

Syndicate content Syndicate content