Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

Nebula FontAwesome

< Back to Nebula Main Page



An utility class that allows developers to use the Font Awesome with some SWT Widgets.


The utility class is called FontAwesome. It contains 2 methods :

  • getFont() returns the FontAwesome font with a size of 14px
  • getFont(int size) returns the FontAwesome font for the given size

It contains also a list of constants, each one associated to an icon.


All widgets that have a setFont() and a setText() methods can use FontAwesome.

  1. You have to call the method FontAwesome.getFont() to get the relevant font.
  2. You set this font to the widget
  3. You select the desired icon and get the corresponding String constant in the class FontAwesome.
  4. You call the method setText() of the widget. Use a FontAwesome constant on as parameter (like FontAwesome.code for instance)

Here is an example with a Label :

Label text = new Label(shell, SWT.NONE);


2 examples called and are located in the plugin org.eclipse.nebula.widgets.fontawesome.snippets.

These examples are also available here :

Back to the top