You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of unclear documentation
As the font file should be loaded from a jarfile, the given code excerpt does not work on those builds, just crashing the entire application on boot. Instead, a code like this should be used:
val fontResource =SwimApplication::class.java.getResourceAsStream(name) ?:throwFileNotFoundException()
val tempFile =File.createTempFile("bgw", "font")
Files.copy(fontResource, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING)
loadFont(tempFile)
Are you refering to KDocs or GitHub Pages?
The paragraph about loading custom fonts does not work on packaged builds, which are expected to be ran during the SoPra.
https://tudo-aqua.github.io/bgw/components/uicomponents/uicomponents.html#loading-custom-fonts
In case of unclear documentation
As the font file should be loaded from a jarfile, the given code excerpt does not work on those builds, just crashing the entire application on boot. Instead, a code like this should be used:
Additional context
Better code example by @p4czyk
The text was updated successfully, but these errors were encountered: