Flex4/flash builder embedded font (applicable to mobile apps)

Source: Internet
Author: User

 

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.