Being able to customise and modify fonts for specific use-cases is incredibly powerful. While tools like FontSquirrel exist to create web-optimised fonts, doing this work manually with FontForge can give you far more control over file size and output of the font.
A good idea to do before removing characters is to take a look at your use case and determine what’s needed and what isn’t.
- ∘ To make it easier to find all the characters, go to Encoding > Compact (hide unused glyphs).
- ∘ Select the characters to be removed.
- ∘ Remove them by going to Encoding > Detach & Remove Glyphs.
To add a character, we’ll need a donor font which includes it. For example, if you need a unicode symbol then Symbola would be the font. However keep in mind that the base font will then need to be re-encoded to accept unicode by going to Encoding > Reencode > Unicode, Full.
- ∘ In the donor font, remove all the characters except the ones we want to add to the base font.
- ∘ Next, save this file: File > Save as... and make sure it is a .sfd file.
- ∘ Go to the base font, which we want to add the character(s) to.
- ∘ Import the file we just save: Element > Merge Fonts. You may be asked about kerning, this doesn't matter.
- ∘ Lastly, if we need to rescale the characters, select the imported glyphs by going to Edit > Select > Changed Glyphs. Then to scale the characters, go to Element > Transformations > Transform.
- ∘ Set Origin to Center of Selection, the second option to Scale Uniformly.. and then set the percentage. Make sure all the option boxes below are ticked.
- ∘ After adding characters, it's always a good idea to reencode to avoid any errors or issues - Encoding > Reencode > whatever options fits (dont use custom).
When you’ve finished working on your font, you’ll need to export it to usable formats. This is achieved using the Generate Fonts option.
- ∘ Go to File > Generate Fonts...
- ∘ Navigate to where you want to save the font in the filesystem.
- ∘ Select the file type to export as in the option for it, make sure your file has the correct format extension as FontForge doesn't tend to change this for you.
- ∘ Before generating, make sure to tick Validate Before Saving. This will highlight any issues with the font, make sure to fix these before generating.
- ∘ Finally, the font can be generated.