Preview
Preview
Container for font preview data, providing access to
webfont files and preview text for rendering specimens.
Information
| Property | Value |
|---|---|
| Namespace | Global |
__construct()
Create a new Preview instance
Parameters
| Name | Type | Description |
|---|---|---|
$font |
Files|null |
Webfont files for rendering the preview |
$text |
string|null |
Text content to display in the preview |
font()
Get the webfont files for this preview
- Returns:
?Kirby\Cms\Files— Collection of webfont files (woff, woff2)
text()
Get the preview text
Falls back to parent page's preview text or page title
if not set on the current page.
- Returns:
?string— Text to display in the font preview
Source: /classes/Preview.php