Using Adobe Fonts with InDesign API
InDesign API supports rendering documents that use fonts from the Adobe Fonts Free library. Fonts used in your InDesign documents are resolved automatically through your Adobe entitlement, so you do not need to upload or host those font files yourself.
data-variant=info
data-slots=text
Prerequisites
- A valid Firefly Services API key and access token. See Authentication.
- An Adobe entitlement that includes Adobe Fonts access.
- A font from the Adobe Fonts Free library.
- A Fonts product profile configured in the Adobe Admin Console and added to your credential in the Adobe Developer Console.
Admin Console setup
Before you can use fonts from the Free library of Adobe Fonts in API calls, your organization must have a Fonts service enabled on a product profile in the Adobe Admin Console, and that profile must be associated with your API credential.
Step 1: Create a product profile with Fonts enabled
- Sign in to the Adobe Admin Console.
- Go to Products and select Firefly Creative Production for Enterprise.
- Click New profile and follow the setup steps.
- On the Enable services step, ensure the Fonts toggle is turned on.
- Click Save.
For detailed instructions on creating product profiles, see Create product profiles.
Step 2: Add the product profile to your project in Developer Console
- Sign in to the Adobe Developer Console.
- Open your project. You will land on the project overview page showing your products and credentials.
- Under Products & services, click the InDesign API - Firefly Services title to open the API detail page.
- On the API detail page, click Edit product profiles.
- Add the Fonts-enabled profile you created in Step 1 and save.
Once the profile is linked to your project, API calls made with that credential will have access to the fonts in the Adobe Fonts Free library.
How it works
When InDesign API opens a document, it looks for every font used in the document. Fonts that are not supplied as assets (for example, in a Document Fonts folder or a configured font directory) are resolved through Adobe Fonts at processing time. No font file URL is required.
Only fonts from the Adobe Fonts Free library can be resolved. If a font cannot be resolved because it is not in the Adobe Fonts Free library, or because it is not provided as input asset, the job will either fail or fallback to a default font, depending on your missingFontStrategy setting.
Request structure
No additional parameters are needed to use Adobe Fonts. Use the generalSettings.fonts object in params to control how missing fonts are handled.
{
"assets": [
{
"source": {
"url": "<PRE-SIGNED URL FOR DOCUMENT>"
},
"destination": "Document.indd"
}
],
"params": {
"generalSettings": {
"fonts": {
"missingFontStrategy": "fail"
}
},
"targetDocuments": [
"Document.indd"
],
"outputMediaType": "application/pdf"
}
}
fonts reference
missingFontStrategyfallback or fail. Defaults to fallback.Submitting a request
Submit the job:
curl -X POST "https://indesign.adobe.io/v3/create-rendition" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assets": [
{
"source": {
"url": "<PRE-SIGNED URL FOR DOCUMENT>"
},
"destination": "Document.indd"
}
],
"params": {
"targetDocuments": [
"Document.indd"
],
"outputMediaType": "application/pdf",
"generalSettings": {
"fonts": {
"missingFontStrategy": "fail"
}
}
}
}'
A successful submission returns a 202 response with a jobId and statusUrl:
{
"jobId": "9b9d00c5-8659-4766-8430-ed0a1c9bd87d",
"statusUrl": "https://indesign.adobe.io/v3/status/9b9d00c5-8659-4766-8430-ed0a1c9bd87d"
}
Error handling
missingFontStrategyfallbackwarnings.missingFonts in the job status.failfallback / failUsing custom fonts
If you need a font that is not in the Adobe Fonts Free library, including any Adobe Fonts that are in the Paid library, supply it as an asset. The font file must be accessible via a pre-signed URL. Place it in a Document Fonts folder parallel to the document so it is found by default.
{
"assets": [
{
"source": {
"url": "<PRE-SIGNED URL FOR DOCUMENT>"
},
"destination": "Document.indd"
},
{
"source": {
"url": "<PRE-SIGNED URL FOR FONT FILE>"
},
"destination": "Document Fonts/CustomFont-Regular.otf"
}
]
}
For more details, see Using custom fonts.