How Do I Install and Use Third Party Fonts in an Android App? (Magic xpa 4.x)
To use third party fonts in an Android app, you first need to include them in your client application and then use them in your Magic xpa application.
-
Place the fonts in the %EngineDir% RIAModules\Android\Source\app\src\main\assets folder.
-
Compile your client application.
To use this font in your application:
-
In the Magic xpa application, open the fonts file (by default it is fnt_rnt.eng) using a text editor.
-
Add new lines, one per each new third party font and save the file.
Note that the font family name in the second parameter must be the same as the font file name without the TTF extension.
For example, the line for the MuseoSans-100.TTF font will be: MyMuseoFont100,MuseoSans-100,12,0,0
-
Save the file and restart the Studio.
-
In the Magic xpa application, define this font for the controls that you want to use, as you would do for any font.
That’s it. You can now run your project and see the new font in your application.
Since version: 3.2a