Oct 01, 2024

Learn how to integrate Custom Icon Fonts into .NET MAUI apps

Learn how to create and integrate custom icon fonts into your .NET MAUI applications. This guide covers the process step-by-step, offering tips for seamless integration and customization to enhance your app’s design with unique and scalable icons.
Image UXDIvers blog

Ever wondered how to add sleek, scalable icons to your app without sacrificing speed or quality? That’s what icon fonts are for! Icon fonts are just like regular fonts, but instead of numbers and letters, we use icons. These icons can be anything from simple shapes and arrows to more complex representations of objects or concepts. Icon fonts became popular first in web design because they allow developers and designers to easily insert scalable vector icons on websites. Afterward, they became a must in the app world for the same reason.

Both in Grial UI Kit, and our custom services, we use icon fonts because they make our lives much easier. There are many advantages to using icon fonts:

  • Organization: Being that it’s a font, you can find every icon in the same place.
  • Consistency: By creating them from the same font style, every icon will share the same style and visual language, which is very important regarding the design.
  • Vector-based: Owing to the fact that they must be vector-based, there’s no quality lost when scaling them up or down. This means that they can adapt to different screen sizes, making them a perfect fit for responsive design.

In this article we will cover everything you need to know about icon fonts, from choosing existing icon fonts, to a step by step guide of how to build your own font.


Choosing an existing icon font

There are many icon libraries dedicated to providing icons, a lot of them are subscription-based, but don’t sweat it! There are other great free options to start building your very own icon font. Material design from Google, has an extensive library of icons you can download for free.

Google Fonts

Another great library that not only offers a free plan but also has a Figma plug-in is Font Awesome. But if you can always keep looking for other icon libraries that suit your app style, there are tons.

Font Awesome

Building our icon font

Preparing our icons

Even though it’s very simple, this step is important because in order to have a flawless icon font, we need the icons to have some special characteristics. Inside our Figma project file, we should have a frame containing these icons, we can even group them into subheadings for the sake of organization. The icons should have the following properties:

  • Size: They should all be the same size (standard size is 24x24).
  • Outline Strokes: This means every stroke should be outlined. 

    Pro tip: You can access the Outline Mode on Figma by pressing CMD+Y on MAC or Ctrl+Y on Windows
  • Unify: Every icon should be unified into only one element by using the boolean operations (union, subtract, intersect, and exclude).
  • Color: As a common practice, every icon should be the same color.

That’s it, if your icons meet these requirements you are ready to export them as SVG and follow these last few steps.

Packaging the icon font

Now that we have chosen and prepared our icons, the next step is to build our icon font. At UXDivers we use IcoMoon, and I have great news! IcoMoon offers a free plan, as well as a paid plan. The only difference between the two is that with the free plan, you save locally in your browser’s cache, this means if you change your computer or clean your cache, that’s it, you can’t come back and edit.

IcoMoon

Here’s a step-by-step on how to import your icons to IcoMoon:

1. Remove free set: The first thing you’ll see is a set of icons called “IcoMoon - Free”. You can go ahead and remove that set of icons by clicking on the three lines on the right of that title and “Remove set”.

Remove free set

2. Import Icons: On the left side of the navbar there’s a purple button that says “Import Icons”. When you click on it, a dialogue box pops up and you can import your icons.

Import icons

3. Selection: Now that you imported your icons a new set should appear called “Untitled Set”. Select all the icons you want in the font.

Pro tip: To quickly select the icons you can just click and drag your cursor over the icons you want selected.

Select icons

4. Generate font: After you select your icons, a button called “Generate font” should become available on the bottom navigation, click on it.

Generate font

5. Preferences: At this stage, you can access the “Preferences” button located on the left side of the navbar in order to change the font’s name and other settings you might like to edit.

Preferences

6. Download: That’s it! You can now download your font by clicking on the “Download” button on the right side of the bottom navigation.

Download font

Wrapping up

By following these steps, you've now got the tools to create and implement your own icon fonts, enhancing both the functionality and visual appeal of your apps. 

Icon fonts offer a seamless way to maintain consistency, scalability, and organization within your designs. Whether you're using them in Grial Kit or your own personal endeavors, icon fonts are an essential part of modern app development that can make your workflow smoother and your apps more engaging. So why not give it a try and see how icon fonts can elevate your next project?

Copy link
We’re excited for new projects!

Have a project in mind?
Let’s get to work.

Start a Project