Bounded on-disk outlined SVG previews with validated RGBA reloads.
More...
#include "donner/editor/FontPreviewCache.h"
|
| | FontPreviewCache (std::filesystem::path directory, std::string buildIdentity) |
| std::optional< svg::RendererBitmap > | load (std::string_view family, std::string_view contentIdentity, Vector2i dimensions) const |
| | Load only when the build, font asset, dimensions, and sidecar integrity match.
|
| void | store (std::string_view family, std::string_view contentIdentity, std::string_view outlinedSvg, const svg::RendererBitmap &bitmap) const |
| | Persist a preview after the resolved text was converted to outline paths.
|
Bounded on-disk outlined SVG previews with validated RGBA reloads.
◆ FontPreviewCache()
| donner::editor::FontPreviewCache::FontPreviewCache |
( |
std::filesystem::path | directory, |
|
|
std::string | buildIdentity ) |
- Parameters
-
| directory | Private per-user cache directory; empty disables persistence. |
| buildIdentity | Embedded editor build identity. |
◆ load()
| std::optional< svg::RendererBitmap > donner::editor::FontPreviewCache::load |
( |
std::string_view | family, |
|
|
std::string_view | contentIdentity, |
|
|
Vector2i | dimensions ) const |
|
nodiscard |
Load only when the build, font asset, dimensions, and sidecar integrity match.
- Parameters
-
| family | Font family displayed in the menu. |
| contentIdentity | Immutable catalog content id and generation. |
| dimensions | Expected output bitmap dimensions. |
◆ store()
| void donner::editor::FontPreviewCache::store |
( |
std::string_view | family, |
|
|
std::string_view | contentIdentity, |
|
|
std::string_view | outlinedSvg, |
|
|
const svg::RendererBitmap & | bitmap ) const |
Persist a preview after the resolved text was converted to outline paths.
- Parameters
-
| family | Font family displayed in the menu. |
| contentIdentity | Immutable catalog content id and generation. |
| outlinedSvg | Standalone SVG containing paths and no text nodes. |
| bitmap | Rendered bitmap for immediate subsequent display. |
The documentation for this class was generated from the following file: