Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

StageText iOS use Custom Font Tip

$
0
0

A small tip I have been using in some projects (AIR iOS apps) to be able to use custom fonts with StageText.

 

When using the StageText you cannot use embedded fonts but you can add the font you want to use in the StageText into the app as follows:

 

1) Add the Font to the InfoAdditions using UIAppFonts:

 

 

<iPhone>    <InfoAdditions><![CDATA[                   <array>                <string>1</string>            </array>                <key>UIStatusBarStyle</key>            <string>UIStatusBarStyleBlackOpaque</string>            <key>UIAppFonts</key>            <array>                <string>MyCustomFont.otf</string>            </array>        ]]></InfoAdditions>    <requestedDisplayResolution>high</requestedDisplayResolution></iPhone>

 

2) Add the font to your app the same way you include any other assets when you package the app, I normally do:

 

 

<!-- Include Fonts --><arg value="-C" /><arg value="${fonts.path}" />

 

3) Now you can set in your StageText instance MyCustomFont as fontFamily.


Viewing all articles
Browse latest Browse all 2954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>