Documentation
¶
Overview ¶
Package fontfallback contains the renderer-internal handoff used to retain trusted fallback assets across multiple scene builds without widening D2's public font resolver interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheStats ¶
CacheStats reports retained trusted-asset preparation work.
func CacheStatsFor ¶
func CacheStatsFor(resolver any) (CacheStats, bool)
CacheStatsFor returns private cache accounting for validation and metrics.
type Font ¶
Font is one resolved font face. Data is owned by the result and may be retained by a scene builder. FaceIndex selects a face in a collection.
type SceneCache ¶
type SceneCache struct {
// contains filtered or unexported fields
}
SceneCache is embedded privately by a resolver that supports the internal scene handoff. Its unexported marker keeps the capability out of public resolver interfaces while allowing this package to recover the cache.
func NewSceneCache ¶
func NewSceneCache(resolve SceneResolveFunc) *SceneCache
NewSceneCache creates a private scene handoff backed by resolve.
func (*SceneCache) HasTrusted ¶
func (c *SceneCache) HasTrusted() bool
HasTrusted reports whether PrepareTrusted has retained its trusted resource.
func (*SceneCache) PrepareTrusted ¶
PrepareTrusted copies and hashes the resolver's trusted source exactly once for this cache. A canceled attempt publishes neither data nor accounting.
type SceneFont ¶
type SceneFont struct {
Font
ID d2scene.AssetID
Face *fontface.ParsedFace
}
SceneFont is the internal scene-builder result. Shared is set only for data copied into the resolver-owned immutable cache. Face is a build-local clone whose mutable shaping caches are never shared between scene builds.