treeform / fidget

Figma based UI library for nim, with HTML and OpenGL backends.
MIT License
763 stars 32 forks source link

Cannot use system fonts in a simple manner #97

Closed beef331 closed 3 years ago

beef331 commented 3 years ago

If passing a absolute directory to the loadFont procedure it fails due to the procedure not checking if it's relative. Currently requires

let fontPath = relativePath("/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMonoNL-Regular.ttf",dataDir)
loadFont("JetBrains", fontPath)
treeform commented 3 years ago

I added the ability to do that here: https://github.com/treeform/fidget/commit/2903ea930e84232fa6b38bf4c0315ddc61877f36

I still want most users to load fonts they ship.

But you can get around this by using loadFontAbsolute()