Skip to content

Just a simple demo that shows how to use FontAwesome5 with Apache Flex

Notifications You must be signed in to change notification settings

olafkrueger/FontAwesome5WithApacheFlex

Repository files navigation

"Font Awesome 5" with "Apache Flex"

This is just a simple demo that shows how to use "Font Awesome 5" with "Apache Flex":

alt text

Use "Font Awesome 5" within your "Apache Flex" application in four steps, it's pretty straightforward:

  1. Download FontAwesome5

  2. Grap the *.otf files from the "use-on-desktop" directory and paste it into your Flex project

  3. Apply the fonts by some style declaration

    <fx:Style>
    		@namespace s "library://ns.adobe.com/flex/spark";
    		@namespace mx "library://ns.adobe.com/flex/mx";
    
    
    		@font-face { 
    			src: url("fonts/FontAwesome5FreeRegular400.otf"); 
    			fontFamily: FontAwesome5Regular;
    			embedAsCFF: true;
    		}
    
    		@font-face { 
    			src: url("fonts/FontAwesome5FreeSolid900.otf"); 
    			fontFamily: FontAwesome5Solid;
    			embedAsCFF: true;
    		}
    
    		@font-face { 
    			src: url("fonts/FontAwesome5BrandsRegular400.otf"); 
    			fontFamily: FontAwesome5Brands;
    			embedAsCFF: true;
    		}	
    </fx:Style>
    

    Notice that spaces and hyphens are removed from the origin *.otf file names here.

  4. Use it with e.g. the spark Label component

    <s:Label text="\uf058" fontFamily="FontAwesome5Regular" fontSize="100" color="#000000" />
    

    Notice that you have to add a leading \u to the icon code!

You find a list of all icons in the "Font Awesome 5" CheatSheet.

Thanks to the Font Awesome 5 team for the great work and for still providing a free version of it!

About

Just a simple demo that shows how to use FontAwesome5 with Apache Flex

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published