Dawoodoz / DFPSR

Fast realtime softare rendering library for C++14 using SSE/AVX/NEON. 2D, 3D and isometric rendering with minimal system dependencies.
https://dawoodoz.com/dfpsr.html
78 stars 6 forks source link

Vector fonts and images #67

Open Dawoodoz opened 1 year ago

Dawoodoz commented 1 year ago

Scalable fonts would allow games that use higher resolutions without having too small or too large raster fonts. Vector fonts should consist of vector images holding glyphs. A typeface should be able to generate fonts with different settings for bold, italic, et cetera. Each vector image should generate raster images with different scales.

Dawoodoz commented 9 months ago

This would require a cache of recently used rasterized vector images that throws away the oldest rendering when the buffer gets full. All characters can not be pre-rendered in all languages, typefaces and sizes in advance, because that would take terrabytes of memory.

Vector images that are not recurring often enough to stay in memory can automatically disable the cache using a flag in the vector image when the reuse rate gets too low. Can also have multiple smaller caches to reduce flooding.