assign a glyph to a keystroke in fontlab

jonathanhughes's picture

I'm working on a font that is more or less a dingbat font. There are going to be a lot of glyphs, and I need to put them in a specific order on the keyboard.

is there a way in Fontlab to specify what strokes on the keyboard are assigned to a glyph (ie. I have a glyph that I want to be accessed by typing option-u. can I specify that somehow, or do i just need to place the glyph in the corresponding cell in fontlab)?

I've searched through the manual and can;t seem to find the answer.

thanks!

Jonathan

Jens Kutilek's picture

You can't do that in FontLab. The assignment of keys to specific unicodes is the responsibility of the keyboard driver/keyboard layout. You could make a custom keyboard layout for use with your font using Ukulele though, but you still have to put your glyphs in the right slots in FontLab first.

Jens

jonathanhughes's picture

Thanks!

Does anyone know of a chart that shows unicode numbers for specific Mac key combinations? I've googled, but haven't found anything that seems to be what I need. Unless there's a simpler way to do what I need to do (assign glyphs to the keys so they follow a specific sequence).

Jonathan

DTY's picture

It all depends which keyboard layout the user has chosen. Don't hack the encoding by giving your dingbats the unicode numbers for other characters unless you're the only person who is ever going to be using it. To assign particular glyphs to particular keystrokes, create a special keyboard layout for your font. If your glyphs don't have unicode values, you can always put them in the PUA.

.00's picture

I believe page 100 of the FLStudio5 Mac manual answers your question.

twardoch's picture

On a Mac:
* when the user chooses the U.S. English keyboard layout, pressing Option-U will produce ¨ and pressing Option-E will produce ´,
* when the user chooses the Polish keyboard layout, pressing Option-U will still produce ¨ but pressing Option-E will produce ę,
* when the user chooses the Czech keyboard layout, pressing Option-U will produce nothing while pressing Option-E will produce ę,
* when the user chooses the French keyboard layout, pressing Option-U will produce º and pressing Option-E will produce ê,
* when the user chooses the Russian keyboard layout, pressing Option-U will produce ў and pressing Option-E will produce ё.

As you see, different keyboard layouts produce different characters. You might produce a font that would have a "handy" character mapping when used with a particular keyboard layout (Swedish, German, Czech, U.S. English or whatever your preferred layout is) but most likely, your "handy" character mapping will be useless for users of keyboard layouts other than yours.

Regards,
Adam

Nick Shinn's picture

If you restricted your font to the ten numbers (which presumably occur in the usual order irrespective of keyboard language), then you could have four sequences of ten symbols in each font (plain, shift, option, and option-shift).

Other than that, just use the North American keyboard, which covers a fair-sized constituency.

jonathanhughes's picture

Thanks for all the assistance, everyone.

Nick, your suggestion sounds like what I ended up doing.

My original post probably should've been more clear about what I was trying to do. I wanted to create a font that was all the numbers 1-99 each in a circle. I know there are existing fonts that are like this, but I thought it would be a fun challenge, and a way to get to know fontlab better. I've used the freeware font Combinumerals in the past, but was always annoyed by the way the glyphs were laid out on the keys. So I wanted to make sure that mine was in a logical order. I was hoping that I could assign a keystroke to a glyph, but since that's not possible, I just figured out where everything was. So everything seems to be cool now -- the QWERTY row gives you 10-19, the ASDFG row gives you 20-21, shift-QWERTY gives you 40-41, and option-QWERTY gives you 70-79, etc. etc., etc.

I just have a little more tweaking to do, and it'll be done.

thanks!

Jonathan

twardoch's picture

> So everything seems to be cool now — the QWERTY
> row gives you 10-19, the ASDFG row gives you
> 20-21, shift-QWERTY gives you 40-41,
> and option-QWERTY gives you 70-79, etc. etc., etc.

Of course this only makes sense if the user is using a U.S. English keyboard. On the German keyboard, the top row is QWERTZ, not QWERTY, while on the French keyboard, it's AZERTY, not QWERTY etc. etc., etc.

I'm not sure if forcing the user to install a particular keyboard layout that he's never used before, to type in some characters, is very user-friendly. Also, keep in mind that once the user generates a PDF with numbers typed in this way, the underlying text will not be searchable and will yield nonsense.

I think you'd be better off (at least as a complementary solution) with contextual alternates, initial, final and medial forms, and stylistic sets.

Adam

jonathanhughes's picture

Thanks for the tips. This font was mainly for my own use, so I wasn't too concerned about it being useful for anyone other than me. Regardless, i released it into the wild for anyone who may find it useful:

http://typophile.com/node/45939

Syndicate content Syndicate content