-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
loadGlyphs() uses the Java class loader to load image resources:
| glyphSprite = ImageIO.read(AsciiPanel.class.getClassLoader().getResource(terminalFontFile)); |
This means that any font file you want to load must be on the Java classpath. It would be nice to be able to load font images from any arbitrary file path instead.
As a workaround, you can add a directory containing your images to the classpath, and use a relative path when creating your AsciiFont. The way I ended up implementing this workaround in Gradle is as follows:
jar {
manifest {
attributes('Class-Path': '..')
}
}(I used .. rather than . because my JAR was in a lib directory, and my paths were relative to the containing directory, but this should work in other situations too.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels