Friday, February 17, 2017

Ext.js - Fonts

Description

Extjs provides the facility to use different font packages. Font packages are used to add different classes for icons available in package.
1. Font-Awesome
2. Font-Pictos

Font-Awesome

ExtJS new theme Triton has the inbuilt font family font-awesome included in the framework inself so we do not need any explicit require for the font-awesome stylesheet.
Below is the example of using Font-Awesome classes in Triton theme.
Font-Awesome with Triton theme
When we are using any other theme other than Triton we need to require or add stylesheet for font-awesome explicitly.
Below is the example of using Font-Awesome classes without Triton theme.
Font-Awesome with normal theme(Any theme other then Triton theme)

Font-Pictos

Font-pictos is not include in framework for EXTJS so we have to require it first and only licenced user of sencha will have the benefit to use font-pictos.
Steps to add font-pictos
1. Require font-pictos class like :
"requires": ["font-pictos"]
2. Now add pictos classes as:
iconCls: 'pictos pictos-home'

No comments:

Post a Comment