FontAwesomeFX 8.3 is there!

FontAwesomeFX 8.3 comes with extended CSS support.

Introducing two new CSS Properties to set the glyph name and size via stylesheet, while the value for the name and the value for the glyph size follows the common JavaFX CSS type definition:

-glyph-name: <string>
-glyph-size: <size>

You can now set all icon properties via CSS only:

   -glyph-name: "THUMBS_UP";
   -glyph-size: 6em;

   -glyph-name: "THUMBS_DOWN";
   -glyph-size: 6em;
FontAwesomeIcon thumbsUpIcon = new FontAwesomeIcon();

FontAwesomeIcon thumbsDownIcon = new FontAwesomeIcon();


CSS style class support is also very handy when used in SceneBuilder or in FXML:


    <FontAwesomeIcon styleClass="thumbs-up-icon" />
    <FontAwesomeIcon styleClass="thumbs-down-icon" />

Get 8.3:
Download Binaries: Download
Sources available at Bitbucket



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

5 thoughts on “FontAwesomeFX 8.3 is there!”

  1. Hi Jens,
    switch from 8.2 to 8.3 in my project leads to the error:
    Exception in thread “JavaFX Application Thread” java.lang.IllegalAccessError: tried to access method com.sun.javafx.css.parser.CSSParser.()V from class de.jensd.fx.glyphs.GlyphIcon
    at de.jensd.fx.glyphs.GlyphIcon.(
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.lang.reflect.Constructor.newInstance(
    at java.lang.Class.newInstance(
    at sun.reflect.misc.ReflectUtil.newInstance(
    at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(
    at javafx.fxml.FXMLLoader$ValueElement.processStartElement(
    at javafx.fxml.FXMLLoader.processStartElement(
    at javafx.fxml.FXMLLoader.loadImpl(
    at javafx.fxml.FXMLLoader.loadImpl(
    at javafx.fxml.FXMLLoader.load(
    at com.airhacks.afterburner.views.FXMLView.loadSynchronously(
    at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(
    at com.airhacks.afterburner.views.FXMLView.getPresenter(

    Switching back works again.

    Greetings Peter

  2. I can’t seem to get -glyph-name and -glyph-size to work, v8.4. I am able to change the color via -fx-fill but the -glyph_8 CSS properties are being ignored.

    1. So you are using fontawesomefx-8.4?
      How did you try to assign the css styles? Did you had a look at the code of my examples, e.g. ‘de.jensd.fx.glyphs.testapps.App’?

  3. Is it possible to create stacked icons using strictly CSS? This new feature with glyph-name selection is very useful, and I’d like to be able to create more varied icons using stacked icons, like we can do in the code.