When compiling a mobile app containing embedded fonts, flex uses non-CFF fonts by default. The CFF font uses FTE. Generally, FTE should be avoided in mobile apps.
Because
The label control uses FTE (and therefore uses the CFF font), so you should use
Textarea or
Textinput control.
In CSS, Set EmbedascffSet
False, As shown in the following example:
<?xml version="1.0" encoding="utf-8"?><!-- mobile_text/Main.mxml --><s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.EmbeddingFontsView"> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @font-face { src: url("../assets/MyriadWebPro.ttf"); fontFamily: myFontFamily; embedAsCFF: false; } .customStyle { fontFamily: myFontFamily; fontSize: 24; } </fx:Style></s:ViewNavigatorApplication>
The textarea control application type selector in the embeddingfontview View:
<?xml version="1.0" encoding="utf-8"?><!-- mobile_text/EmbeddingFontsView.mxml --><s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Embedded Fonts"> <s:TextArea id="ta1" width="100%" styleName="customStyle" text="This is a TextArea control that uses an embedded font."/> </s:View>
If you use a class selector (for exampleS | textareaApply a style (or embed a font). Define a class selector in the main application file. Class selectors cannot be defined in the View of mobile apps.
For more information, see
Using embedded fonts.
Http://help.adobe.com/zh_CN/flex/mobileapps/WS19f279b149e7481c6a9f451212b87fe7e87-8000.html