Hello,
I'm using FontCreator to create a very specific font to be used in engineering software. Is there a way to assign a specific keystroke to a glyph? (like ctrl+a to get a superscript a)
I assume the code point is how the font is reading the key commands. Is there some sort of map that translates the code point ($B8) to keystrokes?
thanks!
Assigning key strokes
-
- Top Typographer
- Posts: 9876
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Assigning key strokes
Code-point $B8 is a cedilla, not a superscripted a. Unless your engineering software supports OpenType features (unlikely) you may be reduced to using Uppercase for regular text and lowercase for supercripts for convenient text input.
-
- Moderator
- Posts: 11155
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: Assigning key strokes
You could also consider making a specific keyboard layout. I guess that has some benefits, but it depends on your exact needs.
-
- Posts: 1
- Joined: Sun Aug 14, 2016 9:46 am
Re: Assigning key strokes
There's a big possibility that it will affect uppercase and lowercase for superscripts. But, gotta atleast try.Bhikkhu Pesala wrote:Code-point $B8 is a cedilla, not a superscripted a. Unless your engineering software supports OpenType features (unlikely) you may be reduced to using Uppercase for regular text and lowercase for supercripts for convenient text input.
-
- Posts: 16
- Joined: Fri May 05, 2017 9:24 am
Re: Assigning key strokes
Indeed, I recommend using Microsoft Keyboard Layout Creator, which is a free software and very easy to use. I've used it before to make my own custom keyboard (which I'm using right now, in fact, and I use it all the time as my default keyboard), and it allows me to easily type diacritic marks using deadkeys (àéïôū etc. are a breeze) and other special characters like æ œ ł ij ȷ ® š ð ſ ŋ þ ž × ç ß etc. which are otherwise more difficult to input.
Just last night, I made a font (based on another opensource font) for the International Phonetic Alphabet using FontCreator, and I created a keyboard to go with it. Now, when I switch to that keyboard:
i kan taip ˈjuziŋ foʊˈnɛtik noˈtæʃǝn
It takes a little practice to reprogram your muscle memory to your new layout, but I find it's well worth it.
Method: when you've made your font, print out a glyph sheet containing all the codepoints for each glyph. In MKLC, start from an existing keyboard (easiest), or start from a blank keyboard, and input each glyph using the keyboard or codepoint. NOTE: you can just type <a> (without brackets) to code that letter for a key, and so forth with any other glyph accessible using the installed keyboard. You can also copy and paste glyphs from MainType or the character map. Finally, (what I find easiest for the glyphs not accessible on my keyboard) you can just simply type in the unicode codepoint, BUT you have to ALWAYS use u+ before each code sequence. So, for a superscript n, you have to type u+027f. If you just type 027f or $027f, it will take that as character input rather than code. (But, as a handy side note, you can use this to make a keystroke input multiple characters, even whole words! Sick of typing "etc."? Just program a keystroke, like AltGr+e, to automatically type that string for you! Even better, they still input as distinct characters, rather than a composite glyph.)
Just make sure to warn other people who use your computer, or they'll suddenly be surprised to find the keyboard doesn't work as they expect!
Just last night, I made a font (based on another opensource font) for the International Phonetic Alphabet using FontCreator, and I created a keyboard to go with it. Now, when I switch to that keyboard:
i kan taip ˈjuziŋ foʊˈnɛtik noˈtæʃǝn
It takes a little practice to reprogram your muscle memory to your new layout, but I find it's well worth it.
Method: when you've made your font, print out a glyph sheet containing all the codepoints for each glyph. In MKLC, start from an existing keyboard (easiest), or start from a blank keyboard, and input each glyph using the keyboard or codepoint. NOTE: you can just type <a> (without brackets) to code that letter for a key, and so forth with any other glyph accessible using the installed keyboard. You can also copy and paste glyphs from MainType or the character map. Finally, (what I find easiest for the glyphs not accessible on my keyboard) you can just simply type in the unicode codepoint, BUT you have to ALWAYS use u+ before each code sequence. So, for a superscript n, you have to type u+027f. If you just type 027f or $027f, it will take that as character input rather than code. (But, as a handy side note, you can use this to make a keystroke input multiple characters, even whole words! Sick of typing "etc."? Just program a keystroke, like AltGr+e, to automatically type that string for you! Even better, they still input as distinct characters, rather than a composite glyph.)
Just make sure to warn other people who use your computer, or they'll suddenly be surprised to find the keyboard doesn't work as they expect!
Thank you!
TD
TD