|
scimesh 0.3.4
Headless CPU-only 3D software renderer for scientific mesh visualization
|
Shared font state: the font bytes, the parsed font and the glyph cache. More...

Public Member Functions | |
| Impl (std::shared_ptr< const std::vector< uint8_t > > bytes, float size, std::string path) | |
Public Attributes | |
| std::shared_ptr< const std::vector< uint8_t > > | data |
| Raw font file bytes. | |
| std::string | source_path |
| Origin of the font, if any. | |
| stbtt_fontinfo | info {} |
| Parsed font tables. | |
| float | pixel_size = 0.0f |
| Em size in pixels. | |
| float | scale = 0.0f |
| Font units to pixel scale. | |
| FontMetrics | metrics |
| Vertical metrics in pixels. | |
| std::mutex | mutex |
Guards cache; makes a Font safe to share between threads. | |
| std::map< uint32_t, GlyphBitmap > | cache |
| Rasterized glyphs, filled on demand. | |
Shared font state: the font bytes, the parsed font and the glyph cache.
Held by std::shared_ptr so that copying a Font is cheap and all copies share the rasterized glyphs. The raw bytes are kept alive because stbtt_fontinfo stores pointers into them.
|
mutable |
| stbtt_fontinfo scimesh::Font::Impl::info {} |
| FontMetrics scimesh::Font::Impl::metrics |
|
mutable |
| float scimesh::Font::Impl::pixel_size = 0.0f |
| float scimesh::Font::Impl::scale = 0.0f |
| std::string scimesh::Font::Impl::source_path |