Salesforce

How Do I Install and Use Third Party Fonts in an Android App? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Install and Use Third Party Fonts in an Android App? (Magic xpa 3.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.

Adding third party fonts to your client application

  1. Place the fonts in the %EngineDir% RIAModules\Android\Source\app\src\main\assets folder.

  2. Compile your client application.

Using the third party font in Magic xpa

To use this font in your application:

  1. In the Magic xpa application, open the fonts file (by default it is fnt_rnt.eng) using a text editor.

  2. 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

  1. Save the file and restart the Studio.

  2. 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

Reference
Attachment 
Attachment