Working with OTLFD Scripts

Before asking a question on FontCreator look here for possible solutions and tutorials. Please do not post support requests here.
Post Reply
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Working with OTLFD Scripts

Post by Bhikkhu Pesala »

What is an OTLFD script? The file extension is short for Open Type Layout Feature Definition, and is used by FontCreator's OpenType Designer. The scripts can be edited in Notepad or a similar text editor.

FontCreator 9.0 or later versions include the Visual OpenType Designer so that users don't need to do so much coding, but the Code Editor is still present for those who prefer to work with code.

Harmonising OpenType Features Between Font Styles

After adding, editing, and ordering the OpenType Features and Lookups for one type style, there's no need to repeat the work for other styles in the same font family. (This assumes that all styles in the same font family have the same glyphs, with the same glyph names. If this is not the case, the Code Editor compiler will report errors such as glyph not found, and will not compile. Warnings, e.g. about unused Kerning Classes can be ignored).

After completing work on the Regular style:-

Export the Script
Export Script.png
Export Script.png (11.29 KiB) Viewed 15243 times
Switch to another style. Since the Italic style may have different kerning values to the Regular style, first one should copy the kerning pair adjustment lookup for the Italic style.

Open Pair Adjustment Lookup in Code Editor
Edit Lookup in Code Editor.png
Edit Lookup in Code Editor.png (47.36 KiB) Viewed 15243 times
Select All (Ctrl A), and Copy (Ctrl C). Do take care that you're not pressing Ctrl V by accident!

Import the Script
Import Script.png
Import Script.png (13.68 KiB) Viewed 15243 times
Confirm Overwrite
Confirm Overwrite.png
Confirm Overwrite.png (21.55 KiB) Viewed 15243 times
Don't worry, changes won't be lost until you save the font project, so you can check that it works correctly before saving the changes.

Open Pair Adjustment for Imported Script
Edit Lookup in Code Editor.png
Edit Lookup in Code Editor.png (47.36 KiB) Viewed 15243 times
Select All (Ctrl A) and paste the lookup back again from the clipboard (Ctrl V). Again, take care that you're not pressing Ctrl C.

OK to save the changes, and verify the script, before saving the updated Font Project.

Repeat for all of the other styles in the Font Family.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Code Editor Compiler Warnings

Post by Bhikkhu Pesala »

Compile Warning.png
Compile Warning.png (4.12 KiB) Viewed 15237 times
Warnings like these won't prevent the OpenType Layout Feature Definition script from compiling successfully.

All these warning mean is that I defined some kerning classes that are used in other types styles, but not in the current style (bold italic).

A look in the Class Manager highlights the unused classes. They may be deleted, but they can be left in case they are wanted later. They do no harm.
Unused Classes.png
Unused Classes.png (2.17 KiB) Viewed 14179 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Search Selected Text

Post by Bhikkhu Pesala »

The Ctrl F Shortcut can be used in the Code Editor to find further occurrences of the selected text.
Searching Selected Text.png
Searching Selected Text.png (49.04 KiB) Viewed 15235 times
I name my lookups the same as the features that use them to make searching easier. The default names are based on the lookup types.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Setting Preferences for the Code Editor

Post by Bhikkhu Pesala »

After reinstalling FontCreator, I found the font too small for comfort in the Code Editor. At the top right of the Code Editor is a button to change the settings. Here, the default font, and colours can be changed to suit your personal preferences. Any available monospaced fonts are listed.
Code Editor Font.png
Code Editor Font.png (60.98 KiB) Viewed 14531 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Re: Working with OTLFD Scripts

Post by MikeW »

Those options are not present in my version of FC Pro 10.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Working with OTLFD Scripts

Post by Bhikkhu Pesala »

MikeW wrote:Those options are not present in my version of FC Pro 10.
Probably, you're looking in the wrong place. Open the Code Editor after opening the OpenType Designer dialogue. Click the icon at top right to change the settings. The settings are there in both FC10 build 2125 and FC9.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Working with OTLFD Scripts

Post by Bhikkhu Pesala »

Regenerating Kerning Pairs
Instead of copying the kerning adjustment pairs lookup for the Italic style before importing the OTLFD script for the Regular style, one can simply regenerate the adjustment pairs. One might also want to do this if the kerning is too tight or too loose.

Right-click on the Kerning adjustment pair lookup in the OpenType Designer, and select Autokern from the context menu.
Autokern.png
Autokern.png (25.89 KiB) Viewed 14482 times
This will open the Automatic Kerning Wizard dialogue, where you can change how tight the calculated kerning will be by adjusting the Glyph Spacing Value. To make the kerning more generous, the second row of Preview Text should be longer than the top row (the current spacing). If it is not, increase the glyph spacing value, and update the preview. Try with different preview text too. When you click on Finish, FontCreator will generate the kerning adjustment pairs, which may take a few minutes on large fonts.
Glyph Spacing Factor.png
Glyph Spacing Factor.png (69.19 KiB) Viewed 14482 times
When the process is finished. Scroll down the list of kerning pairs looking for any that are Blue or Red. Some fonts need to have positive kerning pairs — it's not an error — but the blue pairs often need manual adjustment.
Positive Kerning Values.png
Positive Kerning Values.png (3.74 KiB) Viewed 14482 times
If the Green (negative pairs) all need adjustment because they are too tight or too loose, run the Kerning Wizard again with a different Glyph Spacing Value. Red pairs are zero and won't be exported. They can be left or deleted as you wish.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dave Crosby
Typographer
Typographer
Posts: 793
Joined: Mon Feb 23, 2004 1:13 pm
Location: Enoch, Utah

Re: Working with OTLFD Scripts

Post by Dave Crosby »

Wonderful! That simple little Font Creator I purchased for $35 in 2004 has become a World Leader!
Aut nunc aut nunquam
Post Reply