Stylistic Alternates on Non-OpenType Software?

JapanYoshi's picture

I want to use Stylistic Alternates on a program without OpenType support; namely, the alternate a and W/w on Raleway.
So I would like to make a copy of Raleway where the a and W/w are their alternates.
Is there a way to do it without expense, or is there another workaround solution?

hrant's picture

You could learn FontForge (not a walk in the park though, from what I've heard) and do it yourself. Or barter something with somebody who can do it for you.

hhp

Té Rowan's picture

Well, there's Type 3.2, free-beer and an easy install on my old WinXP machine.

Michel Boyer's picture

The easiest way I see to do that without breaking spacing and kerning is to use ttx which comes for instance with AFDKO and modify appropriately the ttx files you will get as follows.

I will assume you have sed (that comes with OS X and Linux). You could also use perl. The substitutions to make, in the sed syntax, are

s/Raleway/RalewayW/g
s/"w"/"w.ORIG"/g
s/"w.alt"/"w"/g
s/"w.ORIG"/"w.alt"/g
s/"W"/"W.ORIG"/g
s/"W.alt"/"W"/g
s/"W.ORIG"/"W.alt"/g

where the first line changes the font name so as to be able to have both Raleway and RalewayW (the modified font) installed on your system. The other lines just swap the glyph names w.alt with w and W.alt with W.

You put those lines in a file, say mods.sed.

In order to get your modified version of Raleway-Regular.ttf you execute (in the railway font folder) the lines (with unix syntax, so that it works on OS X or Linux)

ttx -t cmap -t GSUB Raleway-Regular.ttf
mv Raleway-Regular.ttx Raleway-RegularW.ttx
ttx -x cmap -x GSUB Raleway-Regular.ttf
sed -f mods.sed Raleway-Regular.ttx > modfont.ttx
ttx modfont.ttx
ttx -m modfont.ttf Raleway-RegularW.ttx
rm -f *.ttx modfont.ttf

On the Mac, you can just copy and paste those lines in the Terminal window. After a few seconds, you get your new font Raleway-RegularW.ttf and the kerning should work fine. Since there is no alternate for the small cap, it will stay as is but that probably makes no difference for your program.

You do the same with all the other fonts and you get your family. That can all be done on all 18 font files with a script if you are familiar with unix.

Syndicate content Syndicate content