Typophile

How can I assign a key combination?

diorg_font

Hi to everyone,
I'm new in this forum but I found many useful informations on Typographic world on it.

I wrote because I have a problem...
I'm modifing an existing font and I have to insert some new glyphs that I should recall by a key combination (like "mblogo"), is it possible? How can I do that?

I use FontLab Studio 5.

Thanks a lot!
Sorry for my english!

Stefano

I've moved your question to the BUILD area where the techies tend to reside.

Piece of cake.
You do need to add some OpenType magic to the font, though.

Using 'liga' code for ligatures:

feature liga {
# Latin
sub T e s t by T_e_s_t;
} liga;

If the program you are using supports ligatures, typing "Test" will automatically be changed to my quick-and-dirty "Test" glyph:


(Left is Ligatures Off, right is On.)

Of course, you are free to use any of the other OTF features, if you don't want to mess with 'standard' ligatures (e.g., put them in a stylistic set or in 'calt' -- contextual ligatures). Use the Opentype feature preview in FontLab to check if it works.

I don't think the sequence "mblogo" could pop up in the middle of a regular English word. However, if you need to use a phrase that can, either don't use ligatures (as these are usually 'on' for all text), or check the OTF Feature File description on how to limit it to a single word. (Sorry -- can't recall, altho' I used to be able to recite it from memory.)

It is considered 'proper usage' if your new glyph name is composed of the singular characters that make it up, separated by underscores. I think this is best seen in PDFs; selecting and copying the "Test" glyph yields the plain text "Test" again. You can also search a PDF for 'test', and it'll find both variants.

To make it easy on yourself, throw a symbol into the string you use for replacement. Something like "=mblogo=" (The lookups use character names, so that would be "equal m b l o g o equal") will protect you from unforeseen surprises if you ever have to write about something like "tourismblogoftheday.com".

Thank you!
I used both of your solutions.
The font works fine.
But I have a little question...
Did you have some books about the font realization to suggest me?
I studied the Fontlab manual but I didn' find anything like "opentype programming language".
Thank you!!
Bye
S

That can best be read from the source: Adobe / OTF / Feature Files

There are a few enhancements as of this year that do not work (yet!) in FontLab, but I doubt you'd use these anyway for a beginners' project.

Chapter 11 of the FontLab manual covers OpenType. The section on substitution lookups starts at p864 in the Mac PDF manual, p854 for Windows.

The League of Movable Type also has a nice tutorial.

Captured from web.archive.org on 27 May 2011. view this capture