Creating Your Own Icon Font Using Metro Studio | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (179).NET Core  (28).NET MAUI  (214)Angular  (110)ASP.NET  (51)ASP.NET Core  (83)ASP.NET MVC  (90)Azure  (41)Black Friday Deal  (1)Blazor  (226)BoldSign  (15)DocIO  (24)Essential JS 2  (109)Essential Studio  (200)File Formats  (69)Flutter  (133)JavaScript  (226)Microsoft  (120)PDF  (81)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (943)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (45)Webinar  (52)Windows Forms  (61)WinUI  (71)WPF  (163)Xamarin  (160)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (9)Business intelligence  (55)Button  (4)C#  (158)Chart  (140)Chart of the week  (54)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (70)Development  (659)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (14)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (19)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (512)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (4)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (14)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (113)UI  (393)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (615)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

Creating Your Own Icon Font Using Metro Studio

Using high quality images is an effective way to keep users’ attention and build their interest in reading the content of webpages and applications. However, the images should be lightweight for quick responsiveness and look crisp on high resolution displays. The best solution is to use icon fonts instead of images.

Key reasons to use icon fonts 

  • Icons are scalable, without loss of quality in high resolution display.
  • Icons are sharp and crisper.
  • Icons are lightweight and they all can be loaded in a single file.
You can create your own icon font using our Metro Studio application to create a metro project and export it to icon font. This blog post is about to teach you how you can create your own icon font and how to use it in your application.

Creating a metro project

After launching the Metro Studio application, you can find icons with different categories. You can create your metro project by following the below steps:
  1. Select the required icons to create an icon font.
  2. Drag the required icons to the “Drop to create a project” option on bottom left of application.
  3. Name your project.
Creating Metro Project
Now your metro project is ready to create icon fonts.

Creating the icon font

Once you select all the required icons, you can create your icon font with the following steps:
  1. Click the Create Font option in your metro project.
  2. By default, each icon is assigned with Unicode. Before downloading the icon fonts, you can rename the icons and define Unicode character for each. Also, you can reset the Unicode of icons using the option on the bottom left of the dialog window.
  3. Once character mapping is done, you can create your icon font with the Generate Font option on bottom right of dialogue.
  4. Name the icon font and choose the location to which to download the icon font.
Icon Font Generation
Icon fonts generated by Metro Studio have various font formats (to support cross-browser compatibility) and demo files.
Icon Font Files
Generated icon fonts can be used in webpages by mapping the icon fonts in your HTML, CSS, and JavaScript. They can also be used in WPF, UWP, and Xamarin applications. Let’s look at how to use the generated icon fonts in a UWP application.

How to use icon font

Once the font file containing icons is embedded in your application, you can use it in different controls that support font family changes. If you had a UWP project, for instance, you’d follow these steps to embed the font file in your project and use our icons in your control:

  1. Copy the true type font file (ttf file) from the fonts folder to your application location.
  2. Include the font file in your project.
  3. Set the Build Action as “Content” for the font file.
Set Build Action as Content
Once you reference the font file in your project, you can change the Font Family of the control to use icons from our font file. Font Family can be set to the control in the following format.
FontFamily ="[PathToTTF]#[NameOfFontFamily]"

We can define our font family in code behind also, as in the following code samples.

string fontFilePath = "ms-appx:///Gallery.ttf#Gallery";
fontIcon.FontFamily = new FontFamily(fontFilePath);

Use the Unicode or Glyph of corresponding icon as text or content value of the control to display the icon.

<TextBlock Foreground="White" FontFamily = "Gallery.ttf#Gallery" Text="&#xe701;" FontSize="18" />
<TextBlock Foreground="White" FontFamily = "Gallery.ttf#Gallery" Text="&#xe701;" FontSize="18" />
<TextBlock Foreground="White" FontFamily = "Gallery.ttf#Gallery" Text="&#xe702;" FontSize="18" />
Icon Font Used in UWP Application

Wrapping up

For more information and details about other features, please refer to our documentation, where you will see customized Character mapping and CSS properties.
The sample code showing how to use the icon font in a UWP application can be downloaded at the Icon Font Sample.
You can download the Metro Studio setup here. Feel free to share your feedback in the comments below. You can also contact us through our support forum or Direct-Trac. We are happy to assist you!


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed