Is it possible to use Font Awesome icons in Adobe Flex 3 since it doesn't allow inline CSS style? If so, how to set the text of Button or Label to properly be shown as icon in Flex?
Currently, I have the following setup for Flex 3.6A and the button isn't showing the icon properly:
Here is the simplify version of ...View.mxml placed in components package:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
currentState="default">
<mx:Style source="../assets/styles.css"/>
<mx:states>
<mx:State name="Hide"/>
<mx:State name="default">
<mx:AddChild>
<mx:HBox>
<mx:Button label="" styleName="complete" id="completeButton" fontFamily="FontAwesome"/>
<mx:Button id="skipButton" />
<mx:Button id="shareButton" />
<mx:Button id="deleteButton" />
<mx:Button id="progressButton" />
</mx:HBox>
</mx:AddChild>
</mx:State>
<mx:State name="Expand"/>
</mx:states>
</mx:Canvas>
Here is the content of styles.css:
@font-face {
fontFamily: FontAwesome;
embed-as-cff: true;
src: url("font-awesome-4.7.0/fonts/fontawesome-webfont.ttf");
fontStyle: normal;
}
@font-face {
fontFamily: FontAwesomeNonCff;
embed-as-cff: false;
src: url("font-awesome-4.7.0/fonts/FontAwesome.otf");
fontStyle: normal;
}
.complete {
font-family: FontAwesome;
color: red;
}



mx:Buttonnow and I did get some warnings. Are you getting any warnings in your console? Can you please paste in a screenshot of your folder structure especially how your fonts and css are located in the project? Thanks. - Gurtej Singh