Contains font glyphs prerendered into texture atlas.
Create GlyphCache object with sufficient size and then call AbstractFont::createGlyphCache() to fill it with glyphs.
See Renderer for information about text rendering.
This class supports the GlyphCacheFeature::ImageDownload (and thus calling image()) only on desktop OpenGL, due to using GL::Texture::image(), which is not available on OpenGL ES platforms.
All glyphs parameters are saved relative to originalSize, although the actual glyph cache texture has size. Glyph padding can be used to account for e.g. glyph shadows.
Same as calling the above with originalSize and size the same.
Sets internal texture format to red channel only. On desktop OpenGL requires ARB_texture_rg (also part of OpenGL ES 3.0 and WebGL 2), on ES2 unconditionally uses GL::TextureFormat::Luminance. This is done for consistency with GL::pixelFormat(), which unconditionally returns GL::PixelFormat::Luminance for PixelFormat::R8Unorm. See GlyphCache(GL::TextureFormat, const Vector2i&, const Vector2i&) for an alternative.