bricks_get_fonts
Overview
Lists all custom fonts registered in Bricks Builder. Returns font family names, variants (weight/style combinations), file URLs for each format (woff2, woff, ttf, otf), and display settings.
Custom fonts are uploaded via bricks_upload_font and stored as a custom post type (bricks_fonts). Each font can have multiple @font-face variants with different weight and style combinations.
Use this tool to check which fonts are available before referencing them in typography settings or global classes.
Key Features
When to Use
Verifying a font was uploaded successfully after using bricks_upload_font
Auditing font assets to identify unused or redundant font files
Before setting font-family in theme styles or global classes
Custom fonts must have been uploaded previously via bricks_upload_font or the Bricks UI
When NOT to Use
When checking Adobe Fonts configuration (use bricks_set_adobe_fonts to manage those)
When looking for system/web-safe fonts (these do not appear in this list)
Parameters
(none)noneoptionalCode Examples
List all custom fonts
Retrieve all registered custom fonts to check availability.
{}{
"data": [
{
"font_id": "a1b2c3",
"font_family": "Inter",
"font_display": "swap",
"variants": [
{
"weight": "400",
"style": "normal",
"files": {
"woff2": "https://example.com/wp-content/uploads/bricks/fonts/inter-regular.woff2"
}
},
{
"weight": "700",
"style": "normal",
"files": {
"woff2": "https://example.com/wp-content/uploads/bricks/fonts/inter-bold.woff2"
}
}
]
}
]
}Common Mistakes
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 2018
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Tips & Warnings
Tip: After confirming a custom font exists in the list, use its exact font_family name in _typography: { "font-family": "YourFont" } within theme styles or global classes.
Tip: Always prefer woff2 format for best compression and browser support. If only ttf/otf files are available, consider converting to woff2 before uploading.