Martin Borzan
11/28/2021, 3:40 AMval fontStr = "fonts/FiraCode-Regular.ttf".apply {
val inputStream = MethodHandles.lookup().lookupClass().getResourceAsStream(this)
val clazzPackage = MethodHandles.lookup().lookupClass().packageName
println("FONT LOADING: $clazzPackage -> $inputStream -> ${loadFont("fonts/FiraCode-Regular.ttf", 14)}")
}
The output when I run the application is
FONT LOADING: me.blocky.logreader.style -> <http://java.io|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?Kabsyaks
03/12/2022, 10:21 AM