contextual multiple substitution in OT

siggy's picture

I'm trying to set up a contextual multiple substitution (one-to-many), but FOG 5 keeps choking on the feature file and won't generate a font. The same substitution works in VOLT for TrueType OpenType fonts, although the substitution works only in Microsoft programs, and not in Adobe programs.

In VOLT, I was able to set up the substitution as:

    comma -> special_glyph comma -- when preceded by -- glyph_group

Now I'm trying to use it in a feature file (based on Adobe specs) for generating a CFF OpenType font in Fontographer 5.

Here's the basic syntax for an Adobe spec feature file:

    sub [ @Glyphclass ] comma' by specialglyph comma;

Essentially, the comma should be replaced with both the specialglyph and the comma whenever the comma follows anything within the @Glyphclass. I can get the multiple substitution to work without the context, but it doesn't work with the context.

Is it possible to set up a multiple substitution with a contextual exception? In other words, the substitution always happens, except in certain contexts (ignore substitution rule)?

Would it work to use contextual chaining?

If the above is not possible with an Adobe spec feature file, is it possible to use VOLT to add OpenType layout to a CFF/PostScript .otf file made in FOG 5?

Thanks!

oldnick's picture

specialglyph comma

I don't think spaces are allowed in glyph names...

sergeym's picture

- I think Adobe applications (or at least InDesign) in the past had problems doing multiple substitutions. This may've changed since I looked at this.

- Yes, it is possible to do multiple substitution with exception context in VOLT. There are no restrictions on EXCEPT contexts unless they should go before 'normal' ones.

- VOLT can load and compile CFF fonts, but won't show any glyphs. People working on CFF fonts usually convert them to TTFs for VOLT work and when layout tables are ready just move them into final font as binaries.

Thanks,
Sergey

Arno Enslin's picture

@ siggy

http://forum.fontlab.com/adobe-fdk-for-opentype-afdko/contextual-multipl...

@ oldnick

There is no space in the glyph name. That are two glyph names. It is a one to multiple substitution.

siggy's picture

Sergey:

I tested Adobe CS4 apps (ID, PS, AI), which do not support multiple substitution (one-to-many). Haven't tried CS5.

Your 3rd point -- I have no idea how to move layout tables into a font as binaries. How much work is involved? I've got 8 font files I would have to do this to.

Arno:

Thanks for the code snippet. I'll try it.

Syndicate content Syndicate content