Open codezan opened 2 years ago
fonts/FiraCode-Regular.ttf
- relative path
/fonts/FiraCode-Regular.ttf
- absolute path
the first option will result in errors if your class is in the org.name
package since the full path will be org/name/fons/FiraCode-Regular.ttf
I am having trouble loading a particular Font in my app. The .ttf file is in the resources folder and the path to the file is also correct. This is the code I used to check:
The output when I run the application is
FONT LOADING: me.blocky.logreader.style -> java.io.BufferedInputStream@6ebd22fa -> null
Clearly, the file is there since the inputStream is not null. But the loadFont method still returns null. Does anybody know what's going on?