How do I install multiple fonts for both bold and normal, I am trying to change the default font.
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace assets "assets.*";
@namespace comp "comp.*";
@font-face {
font-family: localVerdana;
src: url("assets/verdana.ttf");
src: url("assets/verdanab.ttf");
}
s|Label {
font-family: localVerdana;
}
s|TextInput {开发者_开发问答
font-family: localVerdana;
}
s|TextArea {
font-family: localVerdana;
}
</fx:Style>
You need to have one @font-face declaration for each style, weight of font you use
@font-face
{
src: url("assets/verdana.ttf");
font-family: localVerdana;
font-style: normal;
font-weight: normal;
embed-as-cff: true;
advanced-anti-aliasing: true;
}
@font-face
{
src: url("assets/verdanab.ttf");
font-family: localVerdana;
font-style: normal;
font-weight: bold;
embed-as-cff: true;
advanced-anti-aliasing: true;
}
精彩评论