Skip to content

Font Generation

The Font Generator will generate the required code for your custom fonts.


The Font's PostTable does matter. Note that only version 2 contains the name of the Glyph. As a result any font's using other versions in the PostTable should include a mapping css file.

To add a font, create a new project. Typically this will just be a netstandard class library. You do not need any actual code files in the project. Edit the csproj like shown below:

  <AdditionalFiles Include="fa-regular-400-ttf" 
                   CssFile="fontawesome.min.css" />

The Generator will automatically parse both the Font file and the supplied Css or Codepoints file specified. This will generate the required attributes to enabled Font Embedding, as well as the IFont implementation, a static Mapping class that will let you reference FontAwesomeRegular.User instead of supplying far fa-user. Finally it will generate a second FontAwesomeRegular static class in the AP.MobileToolkit.Fonts namespace that provides information about the generated font as well as an instance of the generated IFont instance that you can use to register with the Font Registry.


Ligature based fonts are not supported without either a CSS file or Codepoints file like we use for The Google Material Font library.

Additional Resources