0

I use flex4.5 I have this simple question: I need to embed normal and Bold Arial fonts to my application: I tried that:

@namespace s "library://ns.adobe.com/flex/spark";    
@namespace mx "library://ns.adobe.com/flex/mx";

@font-face {
    src:url("assets/arial.ttf");
    fontFamily: arial;
}

global
{
    font-size: 12;
    color: #000000;
    font-weight: normal;
    font-family: arial;

}

This works fine, except the BOLD fonts were still aliased.

Then I tried that:

@namespace s "library://ns.adobe.com/flex/spark";    
@namespace mx "library://ns.adobe.com/flex/mx";

@font-face {
    src:url("assets/arial.ttf");
    fontFamily: arial;
}

@font-face {
    src:url("assets/arial.ttf");
    fontFamily: arial;
    fontWeight:bold;
}

global
{
    font-size: 12;
    color: #000000;
    font-weight: normal;
    font-family: arial;

}

Bold fonts are not aliased any more, but they are displayed as normal fonts !

My question is : how to embed BOLD and Not BOLD fonts in Flex4.5 Css so both are displayed anti aliased ?

regards

4

1 回答 1

0

尝试使用粗体变体arial-bold或类似名称命名字体,然后将其用作样式声明中的字体系列。您还需要将font-weight样式设置为bold.

于 2012-07-22T12:21:32.363 回答