Text rendering #64

Open
opened 2024-07-25 15:27:41 +02:00 by kayomn · 2 comments
Owner

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.

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.
kayomn added this to the 1.0 milestone 2024-07-25 15:27:41 +02:00
kayomn added this to the GFX Module project 2024-07-25 15:27:42 +02:00
kayomn removed this from the GFX Module project 2024-07-26 01:28:40 +02:00
Author
Owner

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.

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.
Author
Owner

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.

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.
kayomn added this to the GUI Module project 2024-07-26 22:52:18 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kayomn/ona#64
No description provided.