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
GWork's font abstraction builds on the idea that in order to use a font you just have to know the font's facename (e.g. Arial). However some renderers such as SFML (and SDL?) don't load fonts from the system and instead require a filename. GWork uses a workaround where it will just use the font field facename as filename. This seems to work just fine when you can ensure that you only operate with one specific renderer, but it gets more difficult for things like the GWork tests.
For example the Label API test fails to run with the SFML renderer because it only specifies OpenSans without file extension and thus SFML can't load the OpenSans.tff font.
SFML Error:
Failed to load font "OpenSans" (failed to create the font face)
Question is whether this should be refactored by maybe adding another field to the font struct to specify an actual font file or whether there's a more general approach to it, that I currently don't know of.
The text was updated successfully, but these errors were encountered:
It would be nice to move all the hardcoded values to config file at some point in the future, then perhaps you'd reference this font like CSS, via a config set, which might be different per-platform. Then you'd have proper skinning.
Hehe, well I at first want to get some proper CMake configurations working. Building in release with SFML is currently broken (it seems to mix debug/release stuff). Additionally I want to get static linking fully working.
GWork's font abstraction builds on the idea that in order to use a font you just have to know the font's facename (e.g. Arial). However some renderers such as SFML (and SDL?) don't load fonts from the system and instead require a filename. GWork uses a workaround where it will just use the font field
facename
as filename. This seems to work just fine when you can ensure that you only operate with one specific renderer, but it gets more difficult for things like the GWork tests.For example the Label API test fails to run with the SFML renderer because it only specifies OpenSans without file extension and thus SFML can't load the OpenSans.tff font.
SFML Error:
Question is whether this should be refactored by maybe adding another field to the font struct to specify an actual font file or whether there's a more general approach to it, that I currently don't know of.
The text was updated successfully, but these errors were encountered: