Git Product home page Git Product logo

jiconfont-font-awesome's Introduction

⚠️ WARNING ⚠️

This project is no longer maintained!

I have decided to end the project for the time being to work on other projects. However, the project is still usable, I just won't be developing it anymore.

When there is time, I may return to the project, for now the repository is archived.

Download: 1.0.2 Font Awesome version: 5.15.3 License: GPL 3.0

jIconFont – Font Awesome

jIconFont – Font Awesome is Java library, which expands the possibilities of the original library (jIconFont - Font Awesome by Carlos Eduardo Leite de Andrade) and uses latest versions of Font Awesome, and which can be used in Java Swing or JavaFX.

It aims to always be up to date with the latest version of Font Awesome.

For each Font Awesome icon style is there one class. There are three classes:

  • FontAwesomeSolid – for these icons
  • FontAwesomeRegular – for these icons
  • FontAwesomeBrands – for these icons

How to get?

You can download this library from GitHub repository releases, Maven Central repository, or you can use it as Maven dependency:

<dependency>
    <groupId>com.github.pervoj</groupId>
    <artifactId>jiconfont-font-awesome</artifactId>
    <version>1.0.2</version>
</dependency>

Usage

Each usage requires the jIconFont library.

If you are using this library as Maven dependency, this requirement will be attached automatically.

Swing

Using in Swing requires jIconFont - Swing dependency.

How it use? It's simple. Here is example with solid style:

IconFontSwing.register(FontAwesomeSolid.getIconFont());

Icon icon = IconFontSwing.buildIcon(FontAwesomeSolid.CHECK, 40, new Color(0, 150, 0));
JLabel label = new JLabel(icon);

JavaFX

Using in JavaFX requires jIconFont - JavaFX dependency.

JavaFX usage is simple too:

IconFontFX.register(FontAwesomeSolid.getIconFont());

IconNode iconNode = new IconNode(FontAwesomeSolid.CHECK);
iconNode.setIconSize(40);
iconNode.setFill(Color.DARKGREEN);

How to get icon ID?

  1. Go to this page: https://fontawesome.com/icons and find icon, which you want to use.
  2. Check if it is NOT pro icon.
  3. Check what style the icon belongs to and select a class accordingly: FontAwesomeSolid, FontAwesomeRegular or FontAwesomeBrands.
  4. Copy icon ID and use it as FontAwesomeSolid.ICON_ID (all in upper case and replace dashes with underscores).

Font Awesome Catalog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.