#include <font_scope.hpp>
◆ FontScope() [1/2]
◆ ~FontScope()
| pulp::canvas::FontScope::~FontScope |
( |
| ) |
|
◆ FontScope() [2/2]
| pulp::canvas::FontScope::FontScope |
( |
const FontScope & | | ) |
|
|
delete |
◆ bump_generation()
| void pulp::canvas::FontScope::bump_generation |
( |
| ) |
|
Forces a generation bump without a registration.
Useful for integration tests and for scope-level "I know the underlying
platform fonts changed" signals (e.g. macOS font activation).
◆ generation()
| std::uint64_t pulp::canvas::FontScope::generation |
( |
| ) |
const |
|
noexcept |
Monotonic counter; incremented by every successful registration in this scope.
Never resets across process lifetime.
◆ id()
◆ is_registered()
| bool pulp::canvas::FontScope::is_registered |
( |
const std::string & | family | ) |
const |
Family-name lookup limited to this scope.
Does not walk other scopes; that's the resolver's job.
◆ memory_budget()
| std::size_t pulp::canvas::FontScope::memory_budget |
( |
| ) |
const |
|
noexcept |
◆ operator=()
◆ prune_to_budget()
| void pulp::canvas::FontScope::prune_to_budget |
( |
| ) |
|
Explicit prune-to-budget trigger.
Called automatically by set_memory_budget; exposed so memory-pressure handlers can request a manual prune.
◆ register_font()
| bool pulp::canvas::FontScope::register_font |
( |
const std::uint8_t * | data, |
|
|
std::size_t | size, |
|
|
const std::string & | family_override = "" ) |
Register a font from raw TTF/OTF bytes into THIS scope.
Returns true if Skia accepted the bytes and the registration was stored. Idempotent on family_override.
◆ register_font_file()
| bool pulp::canvas::FontScope::register_font_file |
( |
const std::string & | path, |
|
|
const std::string & | family_override = "" ) |
◆ set_memory_budget()
| void pulp::canvas::FontScope::set_memory_budget |
( |
std::size_t | bytes | ) |
|
Memory budget (in bytes) for caches associated with this scope: FontResolver typeface entries, TextShaper segment cache pressure, and Skia strike cache pressure.
0 (default) disables the budget. Setting a non-zero budget triggers an immediate prune_to_budget().
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/font_scope.hpp