Open Type Question

I’m making a new font which has several very open characters (i, j, r) in particular. I’m working in Illustrator, and have made all the joined characters that I need (“ra”, “ir”, etc.). With Font Creator 7, are these considered ligatures (and if so, how do I define the new ligature characters), or new glyphs? I know I’ll have to learn the scripting, but I also read that some features of Open Type aren’t supported–I just don’t know what procedure I need to follow. This is my first try at Open Type–yikes! I’d appreciate any pointers to tutorials, if you know of any, also. Thanks!

Are you’re using the Home Edition or the Standard / Professional Edition? If the former, then see Adding OpenType Features tutorial. If the latter, then use FontCreator’s built-in OpenType Layout Features editor.

If your font is designed so that these ligatures should be used by default, use the rlig (required ligature) feature. If you want the user to decide whether to use them, then use the liga (StandardLigatures) or dlig (DiscretionaryLigatures) features instead.

The ligatures must be defined as new glyphs, so add three more glyphs, import the outlines from Illustrator, resize them to the right height, then use the Glyph Properties toolbar (F3) to rename the ligature glyphs to ir, jr, ra, etc., and click Apply. They don’t need to be mapped since they will only be used by applications that support OpenType features.

Open the OpenType Layout Features editor from the Font menu:

Caut and paste the code below to add the appropriate glyph substitutions:

script latn {
  feature RequiredLigatures;
}

feature RequiredLigatures rlig {
  lookup RequiredLigatures;
}

lookup RequiredLigatures {
  sub i r -> ir;
  sub j r -> jr;
  sub r a -> ra;
}

Click the Validate button to see if it works. If it does, close the editor to save the changes to your project, and test the features in the Font Test window (F5) by typing ir, jr, ra, etc.

Wow, thank you–so very helpful! I’ll have to look up the rlig and liga links you gave. For the moment I’ve been adding the glyphs into Private Space–is that ok? I figured out how to deal with the glyph properties, so that’s all good. Only 84 more required ligatures to go… =). Thanks again Bhikkhu.

The Private Use Area can be used any way that you wish, but with OpenType glyphs there’s no need to map them at all — just insert new glyphs.

FontCreator’s Complete Composites and Glyph Transform features use a lot of PUA code-points for quickly generating Petite Capitals, Superscripts for Ordinals, Discretionary Ligatures, etc. If you select the PUA code-points that you have used, and then Complete Composites, you may find that they are replaced with other glyphs. If they are not mapped, that cannot happen.

See the Complete Composites tutorial for details.

Gotcha, thanks!

Hrm. Appears to be a compiling error (btw, you can’t copy the error message, which is a bit annoying. Hence the screen shot.) Missing semi-colon(s), it says.
printscreen compiling error.jpg

The following post may be relevant to whether or not to use Private Use Area mappings for the ligature glyphs.

http://forum.high-logic.com:9080/t/glyph-names-i-can-understand/3783/9

The glyphnames.dat file can be opened in WordPad.

Near the end of the file there are some ligatures indicated and they all have code points, though those are the code points for the ligatures that have regular Unicode code points.

Erwin is intending to go into more detail tomorrow. At the moment it is not clear to me whether adding a ligature to that list would require a code point.

I did notice from the glyphnames.dat file that, with a few exceptions, the preferred format for a postscript name for a ligature is to include the underscore character, though that appears to be optional.

quote

FB03;f_f_i;preferred
FB03;ffi

end quote

So, although I was intending to use da, de, do etc as postscript names for the ligature glyphs in a blackletter font, I am now wondering whether d_a, d_e, d_o would be better.

Something I need to test is whether the Serif PagePlus X5 program makes any presumptions regarding the name for the ffi ligature.

As my list of blackletter ligatures does have a number with long s in them and some with long s followed by long s I am thinking that using an underscore would be better.

quote

FB05;longs_t;preferred
FB05;longst

end quote

It might come down to personal choice, yet if the glyphnames.dat file has ligatures added into it, it would perhaps become helpful to a user of FontCreator to be using the same list as other people using FontCreator.

I am awaiting the details from Erwin with interest.

William Overington

20 May 2013

If you’re leaving their use to the user’s discretion, shouldn’t you use the dlig (Discretionary Ligatures) feature? (I admit to being more than a little confused about the distinction between the various ligature options.)

To avoid potential conflict with Unicode names, wouldn’t it be safer to rename them as i_r, j_r, r_a, etc?

Another lesson learned: Case matters. And since my font is uni-case (same glyphs for caps and lowercase), I’m guessing that means I need to do the 110 substitutions in both lowercase and uppercase… Rough way to learn Open Type! :unamused: :laughing:

I think the lines

      sub a j -> aj
      sub b j -> bj
      sub c j -> cj

(etc) need to be terminated by semicolons:

      sub a j -> aj;
      sub b j -> bj;
      sub c j -> cj;

Case most certainly matters! Think of ‘Ccedilla’ and ‘ccedilla’, for example, to distinguish between the uppercase and lowercase forms. As for substitutions in a uni-case font, I would have thought you could do it by mapping (but I’m not familiar with the details).

Hrm. My script works… (or is error-free, in any case), but the letter substitutions don’t work in the Test Font window. Back to the drawing board. Nor do they work in an open type program (Illustrator). :confused:

I don’t think you need to duplicate each gsub. Just map each unicase glyph to both cases — e.g. “A” and “a” then do:

sub a r -> ar;

The semicolons are essential, as pointed out by Alfred. I have corrected my code.

rlig and liga seem to be almost identical — dlig would be disabled by default.

Well, I got fi fl and da ligatures to work in Serif PagePlus X5 the other day, but I cannot get them to work in the FontCreator test window this morning.

William

Ok, my code is revised. Semi-colons: check. Caps: check. Compiles: check. Install font: no substitutions.

The OT information should be encapsulated within the typeface file, yes? I don’t need to have a distinct file anywhere? (I’m presuming not, since when I install other OT typefaces they do fine all on their own.)

What else am I missing? I think I’ve attached the font, if anyone feels like wasting some time… =)
Sqwash.otf (90.2 KB)

I also recommend to use an underscore between glyph names.

I think that the difference between rlig and liga is that rlig is to contain things such as the following, where ZWJ is the U+200D ZERO WIDTH JOINER character so as to force a ligature, whether ligatures are turned on or not..

sub c ZWJ t → c_t;
sub s ZWJ t → s_t;

http://www.unicode.org/charts/PDF/U2000.pdf

The liga table is used when ligatures are turned on.

The dlig table is used when discretionary ligatures are turned on.

Ligatures such as c_t and s_t are sometimes placed in the dlig table.

William

Thank you for uploading your font.

I have downloaded a copy and tried it out.

Please know that I too am learning about OpenType.

I opened the file in FontCreator 7 but could not get any OpenType source code.

I was not that surprised as I am wondering if the source code is in the project file and that that is perhaps why High-Logic has introduced a project file.

I tried the font in Serif PagePlus X5 and found that I got some results. Please know that I am still learning as to how to use the OpenType facilities of PagePlus X5.

There is an LA ligature that works well. The la is not a ligature as far as I can tell.

The fractions 1/4 1/2 3/4 all substitute the glyph well.

I also got the ~N and the ~n to work.

That was all that I could find.

I appreciate that this may be a development stage of the font where you are testing to find out if you have got the technique right.

The items that I found seem to be working well.

Is there anything else OpenType in the font that I have not found?

William

Thanks so much, William! Yes, there should be at least 104 substitutions : i + all 26 letters should each result in a combined glyph; the same for l, r, and j.

The diacritical glyphs aren’t open-type–they’re just normal ascii fill-ins.

I think I can attach the source code separately. Oh. The extension otlfd is not allowed for attachment uploads. Sorry… :slight_smile: