Font ID
The Font ID endpoint allows you to retrieve detailed information about a specific font supported by Fontsource.
HTTP Request
GET https://api.fontsource.org/v1/fonts/{id}
Response
The API response for the Font ID endpoint is a JSON object that provides comprehensive details about the font.
Attributes:
Returns an object with:
| Attribute | Type | Description |
|---|---|---|
| id | string | The font ID |
| family | string | The font family |
| subsets | string[] | Language subsets |
| weights | number[] | Font weights |
| styles | string[] | Font styles |
| unicodeRange | Record<string, string> | Unicode range |
| defSubset | string | Default subset |
| variable | boolean | Is the font variable |
| lastModified | string | Last modified date |
| category | string | Font category |
| version | string | Font version |
| type | string | Font type |
| variants | Record<string, object> | File variants |
Variants is an object that creates records starting with weight, style, subset followed by a URL object containing each supported file format (woff2, woff, ttf).
Response example:
⬤⬤
json
Example:
GET https://api.fontsource.org/v1/fonts/abelGET https://api.fontsource.org/v1/fonts/open-sans