Word Substitution in FontLab -- Part Two!

Kristian M's picture

A couple of weeks ago I posted a topic regarding entire word substitution in FontLab. During that post I received a hyperlink to an Adobe forum that shed some light on the matter. After spending much time figuring out the Python language – I finally managed to make a substitution. But there was a catch! I wasn’t able to exchange a shorter word for a longer one. For example I had no trouble switching the Swedish word ‘hemskt’ (awful) for the Swedish word ‘skönt’ (pleasant) -- but when I tried the other way around it didn’t seem to cut it?

feature calt {

lookup calt.pri1 {
sub h' e m s k t by s ;
sub s e' m s k t by k ;
sub s k m' s k t by odieresis ;
sub s k odieresis s' k' t by n ;
sub s k odieresis n t' by t ;
} calt.pri1;

} calt;

Pretty please with sugar on the top -- will anyone help me?

KTKM

twardoch's picture

Kristian,

the Adobe FDK for OpenType library responsible for building OpenType Layout tables in the version 1.6 that is built into FontLab Studio 5 is not able to make one-to-many substitutions. The stand-alone Adobe FDKO for OpenType (AFDKO) version 2.0 is able to create such subsitutions, so you’re able to write:

sub a by b c;

However, none of the Adobe Creative Suite applications supports such substitutions, so even if you successfully put them in your font (e.g. using AFDKO 2 or using Microsoft VOLT), they won’t work in InDesign, Illustrator or Photoshop. Some other applications may support them though.

Regards,
Adam

Kristian M's picture

Thank you Adam!

It doesn’t need to work in any DTP application – as long as I can make a demo in FontLab (5.0.2). But, is there another way to install the FDK tools for FontLab? I’m not very handy with terminal application.

KTKM

k.l.'s picture

It doesn’t need to work in any DTP application – as long as I can make a demo in FontLab (5.0.2).

AFAIK, the fact that FontLab Studio relies on the older AFDKO means that you cannot generate OT fonts with certain lookup types* and also means that FLS cannot display features in the OT preview panel if features include such lookup types. So, no FLS-based demo ...

* E.g. one-by-many substitutions or contextual positioning.

But, is there another way to install the FDK tools for FontLab? I’m not very handy with terminal application.

If you stick to the installation guide, installation is easy, and many question have been dealt with in the AFDKO2 thread. The PDF about 'makeotf', which is the tool to compile an OpenType font from an .otf/.pfa font plus feature text file, is a very good manual.

Karsten

Kristian M's picture

That’s harsh news…

Thank you
KTKM

k.l.'s picture

Sorry. Troubles me too right now.

twardoch's picture

Kristian,

you will need to use the commandline Adobe FDK for OpenType 2.0. However, its use is fairly simple: from FontLab Studio 5, you just generate a Type 1 font, save a .fea features file, and then use the .pfb, .inf and .fea files from MakeOTF that comes with AFDKO 2.

You should be able to use Windows XP Notepad to do your testing/demo, because it does support the one-to-many substitutions. You need to activate multilingual complex script support in Windows (see http://en.wikipedia.org/wiki/Help:Multilingual_support_(Indic)#Windows_XP_and_Server_2003 ). Then, it will work ("calt" is one of the few features that are enabled by default in Notepad when complex script support is activated). I think a Notepad demo is actually more impressive than a demo in InDesign: "Look, it even works in Notepad!"

Regards,
Adam

k.l.'s picture

But when you speak out the word "even", don't forget to make this face:   ;-)

Syndicate content Syndicate content