FontPage
Information
| Property | Value |
|---|---|
| Namespace | Global |
| Extends | Kirby\Cms\Page |
| Implements | Kirby\Uuid\Identifiable, Stringable |
| Source | /models/FontPage.php |
weightName()
Get the font weight name from the font file
- Returns:
string— The weight name or fallback message
weightValue()
Get the font weight value from the font file
- Returns:
string— The weight name or fallback message
fontName()
Get the font name from the font file, mainly used for styling
- Returns:
string— The font name or fallback message
subFamily()
Get the font subfamily name from the font file
- Returns:
string— The subfamily name
fontStyle()
Get the font style (normal or italic)
- Returns:
string— Font style value
fontSlant()
Get the font slant (roman, oblique, italic or backslant)
- Returns:
string— Font slant value
hasOpentypeFeature()
Check for opentype feature
Parameters
| Name | Type | Description |
|---|---|---|
$tag |
?string |
- Returns:
bool
url()
Override URL to return parent font family page URL
Parameters
| Name | Type | Description |
|---|---|---|
$options |
mixed |
URL options |
- Returns:
string— Parent page URL
prettyFontWeight()
Get a formatted/pretty font weight from the font file
- Returns:
string— Pretty formatted font weight or fallback message
preview()
Get preview object with font files and text
- Returns:
NymarkType\Fountain\Preview
controls()
Controls for font tester
- Returns:
string— Comma separated list with controls
fitWidth()
Fit width setting for font tester
- Returns:
?string
fontSize()
Font size for font tester
- Returns:
?string
lineHeight()
Line height for font tester
- Returns:
?string
letterSpacing()
Letter spacing for font tester
- Returns:
?string
textAlign()
Text alignment for font tester
- Returns:
?string
direction()
Text direction for font tester
- Returns:
?string
getPreviewFont()
Deprecated: Use preview()->files() instead
- Returns:
?Kirby\Cms\Files
getFontWeight()
Deprecated: Use fontWeight() instead
- Returns:
string— The weight value or fallback message
getWeightName()
Deprecated: Use weightName() instead
- Returns:
string— The weight name