Embedded font in Alert font-family property doesn't working in Flex 4
I'm using Flex 4. I'm trying to apply a embedded font in all Alert components of the application, to get the same style that all the app, of course.
I code in my CSS file:
@font-face
{
fontFamily: "Tre开发者_如何学Cbuchet MS";
src: url("resources/Trebuchet MS.ttf");
embedAsCFF: true;
}
mx|Alert{
font-family: "Trebuchet MS";
}
s|ButtonBase, s|TextBase, s|TextInput, mx|Label{
font-family: "Trebuchet MS";
color:"#000000";
}
The font-family worked to all componentes, but not to the Alert component. In alert the text message and title got unvisible. If I change to other font-family it works correctly, just the embedded font doesn't work on Alert component. Anyone got this problem?
Obs: The embedded font worked in all the app, just the Alert no.
Notice that Alert is a MX component, not a Spark component. MX components don't handle Device 4 fonts by default.
To make it work, you have to change the textFieldClass for MX components :
mx|global
{
textFieldClass: ClassReference("mx.core.UIFTETextField");
}
精彩评论