1

I have a free font in TTF and WOFF form. I want to create a ”multi-character”, by which I mean a character that when entered will be rendered as other (multiple) characters of that font. For example that when the user types 9 it is actually rendered how Stack Exchange is rendered in that font (yes the whole word). It’s not a monospace font.

Right now, I am using Font Creator from High-Logic and I’ve created a new glyph and am copying the individual glyphs to make a my multi-character. Besides character spacing (I will have to figure out what’s the right value for that), is there anything else I should take care of?

3
+100

If I understand correctly, what you want can be achieved using an OpenType multiple substitution. I do not know, how this is done in your program and whether it is capable of cerating such features at all, so I can only give you the general idea:

  1. Create a lookup of the multiple substitution type and assign it to some feature. Probably you want a feature that is enabled by default, such as ccmp – though there is probably a feature that fits better, but that’s only a question of good practice and should not affect whether it actually works.
  2. Add a new subtable to that feature.
  3. Add an entry to that table corresponding to what you want to have replaced. In FontForge this would be:

    • Base Glyph Name: 9
    • Replacement Glyph names: S t a c k space E x c h a n g e

After this and if the corresponding feature is activated (which in particular requires an OpenType-capable program), whenever somebody types 9 in that font, the font will output Stack Exchange. The kerning (i.e., the spacing of letters) should be as usual in that font.

Something similar can be probably done with other intelligent font technologies such as Graphite or AAT.

  • If you want the substitution to be “hard-coded”, i.e., have the glyph for 9 actually look like Stack Exchange, I once made a script for FontForge that does such things while taking care of the kerning, at least for two letters (it uses German variable and function names though). – Wrzlprmft Feb 22 '15 at 15:17
  • I feel like a dolt, but I can't understand what the script does. From my limited python understanding, it doesn't have an main entry point. I ran it against python interpreter with the font file and unicode points and the string, and it doesn't work. I also tried executing this in the FontForge -> File -> Execute script option, but for some reason, the 'call...' button never gets enabled. I checked out the SVN and you're instantiating the script's class from two other scripts, – 0fnt Feb 22 '15 at 17:48
  • Sorry, my bad. It’s not a FontForge script, it’s a Python script that manipulates FontForge files (and I do not claim it to be well documented). (I can give you instructions in chat though.) – Wrzlprmft Feb 22 '15 at 18:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.