ViteFonts
class ViteFonts
Properties
| static protected array | $manifests | The cached font manifests. |
Methods
Read the font manifest for the given configuration.
Read and decode a manifest file.
Resolve the CSS content from the manifest.
Resolve filtered CSS content using per-alias fragments from the manifest.
Build a :root block containing only the CSS variables for the given aliases.
Read a CSS file from the build directory.
Validate the font manifest structure.
Validate that the requested aliases exist in the manifest.
Validate that each preload entry contains the required keys.
Flush cached manifests.
Details
at line 23
array|null
manifest(bool $isHot, string $buildDirectory, string $manifestFilename, string $hotFile)
Read the font manifest for the given configuration.
at line 39
protected array|null
readManifest(string $path)
Read and decode a manifest file.
at line 76
string
resolveStyleContent(array $manifest, array|null $aliases, string $buildDirectory)
Resolve the CSS content from the manifest.
at line 97
protected string
resolveFilteredStyleContent(array $style, array $aliases)
Resolve filtered CSS content using per-alias fragments from the manifest.
at line 135
protected string
filterVariables(array $variables, array $aliases)
Build a :root block containing only the CSS variables for the given aliases.
at line 157
protected string
readStyleFile(string $buildDirectory, string $file)
Read a CSS file from the build directory.
at line 181
void
ensureValidManifest(array $manifest)
Validate the font manifest structure.
at line 204
void
ensureValidFamilies(array $aliases, array $manifest)
Validate that the requested aliases exist in the manifest.
at line 224
void
ensureValidPreloads(array $preloads, bool $isHot)
Validate that each preload entry contains the required keys.
at line 242
static void
flush()
Flush cached manifests.