Page tree
Skip to end of metadata
Go to start of metadata

This guide explains how to add new fonts into a project.

Adding Font Files 

You may have regular, bold, and italic type of .ttf files separately. Then, you should check the names of files and folders and then add it to Config → Fonts folder into your workspace. Let’s explain with an example:

      1) Let’s say you have a "Times New Roman.ttf" and you want to use it in Smartface project for your mobile app. First, check the name of .ttf file. Smartface does not accept blanks in the file names.

Times New Roman.ttf = NOT WORKS

That’s why, you should change the name of your .ttf file. You can use “.” (dot) between words.

It should be:

Times.New.Roman.ttf = WORKS

      2) Create a folder of your new font, exactly the same name typed above: Times.New.Roman

under the: Config → Fonts

      3) Now, just copy your renamed .ttf file(s) to this folder:

Config → Fonts → YourFontFolder

      4) When you copy all your .ttf file(s) in to the  folder, now you should apply the Smartface integration properties.

There are some rules for the integration of the new font(s) for Smartface. Please write the name as font _ character and types, like the following:

 Original File NameConverted File Name
NormalTimes.New.Roman.ttfTimes.New.Roman_n.ttf
BoldTimes.New.Roman.ttfTimes.New.Roman_b.ttf
ItalicTimes.New.Roman.ttfTimes.New.Roman_i.ttf
Bold_ItalicTimes.New.Roman.ttfTimes.New.Roman_bi.ttf

 

FontConfig.XML

After putting your fonts into your workspace, you need to configure your new font in Smartface. Go to Config ==> FontConfig.xml file and open it.

Just write down the same line like other fonts but change the name of your fonts, exactly what you did it with folder name.

For example here; YourFontFolder

 

Default Font

For text bound objects (Label, TextButton, TextBox ... ) font can be changed. If you use default font for these objects ;

  • iOS devices use Helvetica
  • Android devices use device font

as default.