SkillAgentSearch skills...

FontAwesome5WithApacheFlex

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

Install / Use

/learn @olafkrueger/FontAwesome5WithApacheFlex
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

"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!

Related Skills

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated7y ago
Forks0

Languages

JavaScript

Security Score

55/100

Audited on Feb 17, 2019

No findings