Welcome to the GlPortal issue tracker. New to the project? Try our simple tasks.
- Status New
- Task Type Task
- Category Engine
- Assigned To No-one
- Operating System All
- Severity Medium
- Priority Medium
- Reported Version Development
- Due in Version Undecided
FS#56 - Use vector fonts
As of early versions, the pixel fonts are good enough for the rendering we need.
However it has several issues:
- A new font texture must be generated for each font we'll add
- This font texture must be generated with a tool: extra code separated from glPortal's source. Plus currently it's distributed in conjunction with an EXE blob for Windows which is more than 200 Kb in size
This scales badly when upscaled and even when downscaled (with GL_LINEAR)
We use Signed Distance Field text rendering.
- Is limited to a certain number of characters
It can't have an arbitrary font resolution; would not be a problem if we used explictly bitmap fonts, which is however not the case
The following is proposed instead:
- If we use a library able to render strings, use this ability
- Else, generate font atlases on the fly, possibly reusing SDFont's code, and keeping the Signed Distance Field technique to avoid requiring many atlases (1 per font size).
Of course, the results will be cached to improve performance, and likely garbage-collected or refcounted in the first case to avoid resource exhaustion.