Fonts
The fixed set of font families every template can reference in its font settings. Use it to populate a font picker in your own UI, or to check a family name before publishing a template that depends on it.
Endpoint
Section titled “Endpoint”GET /v1/fontsExample
Section titled “Example”curl "https://pagr-prd-api-public.azurewebsites.net/v1/fonts" \ -H "Authorization: Bearer pagr_prod_xxxxxxxx"import asynciofrom pagr import PagrApiClient
async def main(): async with PagrApiClient("pagr_prod_xxxxxxxx") as client: fonts = await client.get_fonts() # list[str] print(len(fonts), "families") for family in fonts: print(family)
asyncio.run(main())import { PagrApiClient } from 'pagr';
const client = new PagrApiClient('pagr_prod_xxxxxxxx');
const fonts = await client.getFonts(); // string[]console.log(fonts.length, 'families');for (const family of fonts) console.log(family);import org.example.PagrApiClient;import java.util.List;
try (PagrApiClient client = new PagrApiClient("pagr_prod_xxxxxxxx")) { List<String> fonts = client.getFonts(); System.out.println(fonts.size() + " families"); fonts.forEach(System.out::println);}using Pagr.Sdk;
using var client = new PagrApiClient("pagr_prod_xxxxxxxx");
IReadOnlyList<string> fonts = await client.GetFontsAsync();Console.WriteLine($"{fonts.Count} families");foreach (var family in fonts) Console.WriteLine(family);require "pagr"
client = Pagr::Client.new("pagr_prod_xxxxxxxx")
fonts = client.fonts # Array<String>puts "#{fonts.size} families"fonts.each { |family| puts family }#include "pagr/PagrApiClient.hpp"
pagr::PagrApiClient client("pagr_prod_xxxxxxxx");
const auto fonts = client.get_fonts(); // std::vector<std::string>std::cout << fonts.size() << " families\n";for (const auto& family : fonts) { std::cout << family << "\n";}A get_fonts_async form returning std::future<std::vector<std::string>> is also available.
Path parameters
Section titled “Path parameters”None.
Query parameters
Section titled “Query parameters”None.
Request body
Section titled “Request body”None — this is a GET.
Response
Section titled “Response”200 → a plain array of strings, not wrapped in an object:
[ "Arial", "Courier New", "DejaVu Sans", "DejaVu Sans Mono", "DejaVu Serif", "Georgia", "Helvetica", "Inter", "Lato", "Liberation Mono", "Liberation Sans", "Liberation Serif", "Merriweather", "Montserrat", "Open Sans", "Playfair Display", "Roboto", "Source Code Pro", "Times New Roman", "Verdana"]This is the only list endpoint that is not wrapped in the paged envelope — the set is small and fixed, so there is nothing to page.
SDK reference
Section titled “SDK reference”| SDK | Method | Returns |
|---|---|---|
| Python | await client.get_fonts() |
list[str] |
| TypeScript | await client.getFonts() |
string[] |
| Java | client.getFonts() |
List<String> |
| C# | await client.GetFontsAsync(cancellationToken) |
IReadOnlyList<string> |
| Ruby | client.fonts |
Array<String> |
| C++ | client.get_fonts() / get_fonts_async() |
std::vector<std::string> |
Errors
Section titled “Errors”This endpoint takes no input, so only auth and transport errors apply — 401
(bad key), 429 (rate limited), 5xx. As a read, the SDKs retry transient
server failures automatically. See
Errors for the full table.
Related articles
Section titled “Related articles”- Validate data — catch an unresolvable font before rendering.
- Errors → Render issues — where
UnresolvedFontsits. - Fonts — the workspace view of font management.
