|
|
Web
Panel Receiver Endpoint Fonts |
Returns a JSON array listing all font files found in the fonts/ subdirectory of the panel directory. Used by the panel at startup to inject @font-face declarations so custom fonts are available for use in widgets..
|
GET
http://localhost:8080/fonts |
Response — 200 OK, Content-Type: application/json
|
[ { "name":
"Shock", "file": "fonts/Shock.otf"
}, { "name":
"My Custom Font", "file":
"fonts/subfolder/MyCustomFont.woff2" } ] |
|
Field |
Description |
|
name |
Display name derived from the filename: extension stripped, hyphens/underscores replaced with spaces, title-cased. Used as the CSS font-family name |
|
file |
Path relative to the server root, suitable for use in a CSS src: url(...) declaration |
The array is sorted alphabetically by name. Returns an empty
array [ ] if the fonts/ directory does not exist or
contains no supported font files.
Supported formats: .woff2, .woff, .ttf,
.otf
File serving: GET /fonts/<filename>
Serves an individual font file as binary with the appropriate MIME type.
|
Extension |
MIME type |
|
.woff2 |
font/woff2 |
|
.woff
|
font/woff |
|
.ttf |
font/ttf |
|
.otf |
font/otf |
Returns 404 if the file does not exist.
Directory traversal (..) is rejected with 403.
Place font files in the fonts/ subdirectory of your
panel directory:
panel/
fonts/
MyFont.ttf
Icons.woff2
The panel loads fonts before rendering widgets, so custom font names are immediately available in the Appearance → Panel Font selector and in per-widget Font override fields.