embedded font won't work in Flex mobile ActionBar

前端 未结 6 1944
一向
一向 2021-02-09 14:51

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条回答
  •  -上瘾入骨i
    2021-02-09 15:08

    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";
    }
    

提交回复
热议问题