embedded font won't work in Flex mobile ActionBar

前端 未结 6 1112
执念已碎
执念已碎 2021-02-09 14:33

i\'ve got a few fonts embedded and am using them in my mobile application, and they are all working, except for the ones i try to use for the \"ActionBar\". They work everywhere

6条回答
  •  灰色年华
    2021-02-09 15:06

    Here's an example of embedding fonts twice, once with embedAsCFF=false and again using embedAsCFF=true. View the full explanation at http://blogs.adobe.com/jasonsj/2011/08/embedding-fonts-in-flex-mobile-projects.html.

    Edit 1: Fixed font file name

    /* StyleableTextField, regular */
    @font-face {
        src: url("assets/COMIC.TTF");
        fontFamily: "comic";
        embedAsCFF: false;
    }
    
    /* StyleableTextField, bold */
    @font-face {
        src: url("assets/COMICBD.TTF");
        fontFamily: "comic";
        fontWeight: bold;
        embedAsCFF: false;
    }
    
    /* Label, regular */
    @font-face {
        src: url("assets/COMIC.TTF");
        fontFamily: "comicCFF";
        embedAsCFF: true;
    }
    
    /* Label, bold */
    @font-face {
        src: url("assets/COMICBD.TTF");
        fontFamily: "comicCFF";
        fontWeight: bold;
        embedAsCFF: true;
    }
    
    s|Label
    {
        fontFamily: "comicCFF";
    }
    
    s|ActionBar
    {
        fontFamily: "comic";
    }
    
    s|LabelItemRenderer
    {
        fontFamily: "comic";
    }
    

提交回复
热议问题