Text rendering #64
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kayomn/ona#64
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Initial thoughts and questions:
Should text rendering be implemented as part of the graphics engine itself or atop it in a GUI layer?
Implementing it outside the renderer allows for more specialized case-specific implementations and optimizations.
GUIs need clear and precise fonts at flexible scales. You cannot get this easily with atlases and SDF has visual artifacts.
World-space text that you would see on particle effects usually only need to show specific pre-rendered messages.
Implementing it closer to the application layer means that you will inevitably end up with many different implementations and no "canonical best option". For the points above this is good, but from a beginner point of view this may be confusing.
The majority of text on the screen in the common case for games will usually be powered by GUIs, so perhaps this is the main area of focus.
Would any potential GUI tech live inside the GFX module or be delegated to it's own that depends on GFX?
Atlases can only represent a limited subset of glyphs from a font set. Any GUI font system will need support for the full range of a font.
I considered adding sub-pixel font rendering to the list of things to discuss, but it incurs too many restrictions. For example, simply moving the where the bounding box is rendered on the screen would incur a recalculation of the backing image.
Gonna implement a V1 of text rendering in a GUI module. It's less destructive than implementing it as part of the GFX module when it doesn't need to be. At the very least, it can be integrated later and the GUI solution can be phased out or adapted.