For the version 0.2.0 readme, please check the scala-version branch.
This is a very basic multi-layer icon font utility that I extracted from another project of mine, for Java 17+. It lets you use your own font icons in Swing applications, optionally with multiple layers in one icon. Below screenshot shows several examples using the same three layers.
Another example that shows how "unset" colors change with the foreground color:
Layers can also take their colors from the UIManager, using a key. This is especially useful when using FlatLaf, which lets you define such key-value pairs in the properties files. For example, let's assume we have two themes, light and dark.
In DarkTheme.properties:
Theme.accent = #33A1FD
In LightTheme.properties:
Theme.accent = #DF2935
We can now use "Theme.accent" to lookup colors.
Layer.of(Symbol.CUT_ACCENT.text(), "Theme.accent")
Animated theme change in FlatLaf:
To see how to use, please check the demos, and documentation comments in the
files.
The layeredfonticon project offers Java Swing support without any other dependencies. The layeredfonticon-flat project adds a little better support for the magnificent FlatLaf look and feel.
In pom.xml, add
<dependencies>
<dependency>
<groupId>io.github.mimoguz</groupId>
<artifactId>layeredfonticon</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
to use the base version, or
<dependencies>
<dependency>
<groupId>io.github.mimoguz</groupId>
<artifactId>layeredfonticon</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>io.github.mimoguz</groupId>
<artifactId>layeredfonticon-flat</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
to use FlatLaf specific version.