# After Effects

Turn an After Effects composition into a video. Install Blitframe for After Effects, export the composition, upload it as a ZIP and render it.

[After Effects support](/docs/blitframe/after-effects-support) lists which After Effects features render. Check your composition against it before you export.

## 1. Install Blitframe for After Effects

Blitframe for After Effects is an After Effects extension, built on Bodymovin, that exports a composition as Lottie (`data.json`) for Blitframe. It runs on Windows, in After Effects CC 2014 and later. On macOS, or if you prefer it, [export with Bodymovin](#export-with-bodymovin) instead.

1. Download [Blitframe-AE-1.0.15-windows.zxp](https://codeartworks.com/downloads/Blitframe-AE-1.0.15-windows.zxp) (14.2 MB). Its SHA-256 is `953d5f186d316c5548ec76454309f2a5c5a66f7d755841e7725a15a1ff9c5393`. To see it, run `Get-FileHash Blitframe-AE-1.0.15-windows.zxp` in PowerShell.
2. Close After Effects and install the file with Adobe's installer, which comes with the Creative Cloud desktop app. Run it from a Command Prompt, with the path where you saved the file:

   ```text
   "C:\Program Files\Common Files\Adobe\Adobe Desktop Common\RemoteComponents\UPI\UnifiedPluginInstallerAgent\UnifiedPluginInstallerAgent.exe" /install "%USERPROFILE%\Downloads\Blitframe-AE-1.0.15-windows.zxp"
   ```

   Or open the file with a ZXP installer app, such as ZXPInstaller.
3. Start After Effects. Open **Edit → Preferences → Scripting & Expressions** and turn on **Allow Scripts to Write Files and Access Network**. Without it, the export fails.
4. Open the panel from **Window → Extensions → Blitframe**.

## 2. Export your composition

1. Open your project in After Effects and make the composition you want to export the active one.
2. In the **Blitframe** panel, select the composition. Its nested precompositions are exported with it, so you don't select them.
3. In the composition's settings (the gear icon), keep **Assets** not embedded. Images and video then stay separate files in the export folder.
4. Choose an output folder with the **…** button next to the composition name.
5. Click **Render**. If a font dialog appears, click **OK** without changes.

![The Blitframe panel in After Effects. The Compositions tab lists Shot1 and Shot2, with Shot1 selected. Each row has a gear icon for its settings and a … button for its output folder. The Render button is at the top left.](/docs/blitframe/images/after-effects-panel.png)

The export folder holds `data.json` and, if the composition uses images, video or 3D models, an `images/` folder with their files:

![The export folder in a file browser: an images folder and a data.json file.](/docs/blitframe/images/after-effects-export-folder.png)

The panel always exports text with its font names, not glyph outlines, because Blitframe renders text from the real font files.

When the export finishes, the panel shows a **Validator** list of features Blitframe does not render. It does not stop the export, and it does not yet match what Blitframe renders for every feature ([the Validator list](/docs/blitframe/after-effects-support#the-validator-list)). The version's `problems` and `warnings` in [step 4](#check-and-fix) are what counts.

![The Validator at the bottom of the Blitframe panel shows PASS and "No findings." for the selected composition.](/docs/blitframe/images/after-effects-validator-pass.png)

![After an export, the Validator shows 1 error. Its table names the composition, the layer Headline, the property Effects/Scatter, and the message that the Scatter effect is not in the supported effect list.](/docs/blitframe/images/after-effects-validator-errors.png)

Add the other files the composition uses to the export folder:

| File | What to do |
|---|---|
| Video | Nothing. The panel copies each video file into `images/` with the images. |
| 3D models | Nothing. The panel exports each model layer with its model file. |
| Fonts | Name each file after its family and style, such as `fonts/Montserrat-Bold.ttf`. Fonts are found by name, not by path ([how fonts are matched](/docs/blitframe/fonts#how-fonts-are-matched)). |
| Sound | Add the audio file. Sound does not come from the composition. Name the file as `audio` in the [render request](/docs/blitframe/renders#create-a-render), or set it as the [soundtrack](/docs/blitframe/projects#soundtrack) in an edit. |

[Media files](/docs/blitframe/after-effects-support#media-files) lists the formats that render.

## 3. Package and upload

Zip the export folder. Put `data.json` at the root of the ZIP or inside one folder, and keep one composition per ZIP. The folder that holds the shallowest `data.json` becomes the root of the version ([details](/docs/blitframe/uploads#as-a-new-project)). Zipping the export folder itself gives you that. ZIP is the only supported package format.

Then upload the ZIP, create a project from it and read the new version, in five requests. They expect the ZIP to be named `summer-sale.zip`. `BLITFRAME` and `BLITFRAME_API_KEY` are set as in the [quickstart](/docs/blitframe/quickstart#get-an-api-key), and [Before you start](/docs/blitframe/quickstart#before-you-start) lists what each language needs. The curl commands use [jq](https://jqlang.org) to read the responses.

::: code-tabs
```bash
# 1. Get an upload URL for the ZIP
UPLOAD=$(curl -s -X POST $BLITFRAME/uploads \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"summer-sale.zip","sizeBytes":'$(wc -c < summer-sale.zip | tr -d ' ')'}')
UPLOAD_ID=$(echo "$UPLOAD" | jq -r .id)

# 2. Send the bytes to the URL it returned
curl -s -X PUT --upload-file summer-sale.zip "$(echo "$UPLOAD" | jq -r .url)"

# 3. Complete the upload
curl -s -o /dev/null -X POST $BLITFRAME/uploads/$UPLOAD_ID/complete \
  -H "Authorization: Bearer $BLITFRAME_API_KEY"

# 4. Create the project; the ZIP becomes its first version
PROJECT=$(curl -s -X POST $BLITFRAME/projects \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Summer sale","zipUploadId":"'$UPLOAD_ID'","fontLicenseAccepted":true}')
PROJECT_ID=$(echo "$PROJECT" | jq -r .id)
VERSION_ID=$(echo "$PROJECT" | jq -r .headVersionId)

# 5. Read the new version's problems and warnings
curl -s $BLITFRAME/versions/$VERSION_ID \
  -H "Authorization: Bearer $BLITFRAME_API_KEY" | jq '{problems, warnings}'
```
```python
import os, requests

api = os.environ["BLITFRAME"]
headers = {"Authorization": f"Bearer {os.environ['BLITFRAME_API_KEY']}"}

# 1. Get an upload URL for the ZIP
upload = requests.post(f"{api}/uploads", headers=headers,
                       json={"fileName": "summer-sale.zip", "sizeBytes": os.path.getsize("summer-sale.zip")}).json()

# 2. Send the bytes to the URL it returned
with open("summer-sale.zip", "rb") as file:
    requests.put(upload["url"], data=file)

# 3. Complete the upload
requests.post(f"{api}/uploads/{upload['id']}/complete", headers=headers)

# 4. Create the project; the ZIP becomes its first version
project = requests.post(f"{api}/projects", headers=headers,
                        json={"name": "Summer sale", "zipUploadId": upload["id"], "fontLicenseAccepted": True}).json()
project_id = project["id"]
version_id = project["headVersionId"]

# 5. Read the new version's problems and warnings
version = requests.get(f"{api}/versions/{version_id}", headers=headers).json()
print({"problems": version["problems"], "warnings": version["warnings"]})
```
```javascript
import { readFile, stat } from "node:fs/promises";

const api = process.env.BLITFRAME;
const headers = { Authorization: `Bearer ${process.env.BLITFRAME_API_KEY}` };
const json = { ...headers, "Content-Type": "application/json" };
const post = async (path, body) =>
  (
    await fetch(api + path, {
      method: "POST",
      headers: body ? json : headers,
      body: body && JSON.stringify(body),
    })
  ).json();

// 1. Get an upload URL for the ZIP
const upload = await post("/uploads", { fileName: "summer-sale.zip", sizeBytes: (await stat("summer-sale.zip")).size });

// 2. Send the bytes to the URL it returned
await fetch(upload.url, { method: "PUT", body: await readFile("summer-sale.zip") });

// 3. Complete the upload
await post(`/uploads/${upload.id}/complete`);

// 4. Create the project; the ZIP becomes its first version
const project = await post("/projects", { name: "Summer sale", zipUploadId: upload.id, fontLicenseAccepted: true });
const projectId = project.id;
const versionId = project.headVersionId;

// 5. Read the new version's problems and warnings
const { problems, warnings } = await (await fetch(`${api}/versions/${versionId}`, { headers })).json();
console.log({ problems, warnings });
```
```php
<?php
function call(string $method, string $path, ?array $body = null, array $headers = []): array {
    $headers[] = "Authorization: Bearer " . getenv("BLITFRAME_API_KEY");
    $ch = curl_init(getenv("BLITFRAME") . $path);
    curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => $method]);
    if ($body !== null) {
        $headers[] = "Content-Type: application/json";
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
    }
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    return json_decode(curl_exec($ch), true);
}

// 1. Get an upload URL for the ZIP
$upload = call("POST", "/uploads", ["fileName" => "summer-sale.zip", "sizeBytes" => filesize("summer-sale.zip")]);

// 2. Send the bytes to the URL it returned
$file = fopen("summer-sale.zip", "rb");
$ch = curl_init($upload["url"]);
curl_setopt_array($ch, [
    CURLOPT_UPLOAD => true,
    CURLOPT_INFILE => $file,
    CURLOPT_INFILESIZE => filesize("summer-sale.zip"),
    CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
fclose($file);

// 3. Complete the upload
call("POST", "/uploads/{$upload['id']}/complete");

// 4. Create the project; the ZIP becomes its first version
$project = call("POST", "/projects", ["name" => "Summer sale", "zipUploadId" => $upload["id"], "fontLicenseAccepted" => true]);
$projectId = $project["id"];
$versionId = $project["headVersionId"];

// 5. Read the new version's problems and warnings
$version = call("GET", "/versions/$versionId");
print_r(["problems" => $version["problems"], "warnings" => $version["warnings"]]);
```
```ruby
require "net/http"
require "json"

def call(method, path, body = nil, headers = {})
  uri = URI(ENV["BLITFRAME"] + path)
  headers = { "Authorization" => "Bearer #{ENV["BLITFRAME_API_KEY"]}" }.merge(headers)
  headers["Content-Type"] = "application/json" if body
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
    http.send_request(method, uri.request_uri, body&.to_json, headers)
  end
  JSON.parse(response.body)
end

# 1. Get an upload URL for the ZIP
upload = call("POST", "/uploads", { fileName: "summer-sale.zip", sizeBytes: File.size("summer-sale.zip") })

# 2. Send the bytes to the URL it returned
uri = URI(upload["url"])
request = Net::HTTP::Put.new(uri)
File.open("summer-sale.zip", "rb") do |file|
  request.body_stream = file
  request["Content-Length"] = file.size.to_s
  Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
end

# 3. Complete the upload
call("POST", "/uploads/#{upload["id"]}/complete")

# 4. Create the project; the ZIP becomes its first version
project = call("POST", "/projects", { name: "Summer sale", zipUploadId: upload["id"], fontLicenseAccepted: true })
project_id = project["id"]
version_id = project["headVersionId"]

# 5. Read the new version's problems and warnings
version = call("GET", "/versions/#{version_id}")
puts version.slice("problems", "warnings")
```
```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func call(method, path string, body any, headers map[string]string) map[string]any {
	var payload bytes.Buffer
	if body != nil {
		if err := json.NewEncoder(&payload).Encode(body); err != nil {
			panic(err)
		}
	}
	req, err := http.NewRequest(method, os.Getenv("BLITFRAME")+path, &payload)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("BLITFRAME_API_KEY"))
	if body != nil {
		req.Header.Set("Content-Type", "application/json")
	}
	for name, value := range headers {
		req.Header.Set(name, value)
	}
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	var out map[string]any
	if err := json.NewDecoder(res.Body).Decode(&out); err != nil {
		panic(err)
	}
	return out
}

func main() {
	// 1. Get an upload URL for the ZIP
	file, err := os.Open("summer-sale.zip")
	if err != nil {
		panic(err)
	}
	info, err := file.Stat()
	if err != nil {
		panic(err)
	}
	upload := call("POST", "/uploads", map[string]any{"fileName": "summer-sale.zip", "sizeBytes": info.Size()}, nil)
	uploadID := upload["id"].(string)

	// 2. Send the bytes to the URL it returned
	req, err := http.NewRequest("PUT", upload["url"].(string), file)
	if err != nil {
		panic(err)
	}
	req.ContentLength = info.Size()
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	res.Body.Close()

	// 3. Complete the upload
	call("POST", "/uploads/"+uploadID+"/complete", nil, nil)

	// 4. Create the project; the ZIP becomes its first version
	project := call("POST", "/projects", map[string]any{"name": "Summer sale", "zipUploadId": uploadID, "fontLicenseAccepted": true}, nil)
	projectID := project["id"].(string)
	_ = projectID // the next steps use it
	versionID := project["headVersionId"].(string)

	// 5. Read the new version's problems and warnings
	version := call("GET", "/versions/"+versionID, nil, nil)
	fmt.Println(map[string]any{"problems": version["problems"], "warnings": version["warnings"]})
}
```
```csharp
using System.Net.Http.Json;
using System.Text.Json.Nodes;

var api = Environment.GetEnvironmentVariable("BLITFRAME");
var http = new HttpClient();

async Task<JsonNode> call(HttpMethod method, string path, object? body = null, params (string Name, string Value)[] headers)
{
    var request = new HttpRequestMessage(method, api + path);
    request.Headers.Authorization = new("Bearer", Environment.GetEnvironmentVariable("BLITFRAME_API_KEY"));
    if (body != null) request.Content = JsonContent.Create(body);
    foreach (var (name, value) in headers) request.Headers.Add(name, value);
    var response = await http.SendAsync(request);
    return (await response.Content.ReadFromJsonAsync<JsonNode>())!;
}

// 1. Get an upload URL for the ZIP
var upload = await call(HttpMethod.Post, "/uploads", new { fileName = "summer-sale.zip", sizeBytes = new FileInfo("summer-sale.zip").Length });
var uploadId = upload["id"]!.GetValue<string>();

// 2. Send the bytes to the URL it returned
await using var file = File.OpenRead("summer-sale.zip");
await http.PutAsync(upload["url"]!.GetValue<string>(), new StreamContent(file));

// 3. Complete the upload
await call(HttpMethod.Post, $"/uploads/{uploadId}/complete");

// 4. Create the project; the ZIP becomes its first version
var project = await call(HttpMethod.Post, "/projects", new { name = "Summer sale", zipUploadId = uploadId, fontLicenseAccepted = true });
var projectId = project["id"]!.GetValue<string>();
var versionId = project["headVersionId"]!.GetValue<string>();

// 5. Read the new version's problems and warnings
var version = await call(HttpMethod.Get, $"/versions/{versionId}");
var problems = version["problems"]!.AsArray().Select(p => (string?)p);
var warnings = version["warnings"]!.AsArray().Select(w => (string?)w);
Console.WriteLine($"problems: [{string.Join("; ", problems)}] warnings: [{string.Join("; ", warnings)}]");
```
```java
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Path;

public class Example {
    static final ObjectMapper json = new ObjectMapper();
    static final HttpClient http = HttpClient.newHttpClient();

    static JsonNode call(String method, String path, String body, String... headers) throws Exception {
        HttpRequest.Builder request = HttpRequest.newBuilder(URI.create(System.getenv("BLITFRAME") + path))
            .header("Authorization", "Bearer " + System.getenv("BLITFRAME_API_KEY"))
            .method(method, body == null ? HttpRequest.BodyPublishers.noBody() : HttpRequest.BodyPublishers.ofString(body));
        if (body != null) request.header("Content-Type", "application/json");
        if (headers.length > 0) request.headers(headers);
        return json.readTree(http.send(request.build(), HttpResponse.BodyHandlers.ofString()).body());
    }

    public static void main(String[] args) throws Exception {
        Path zip = Path.of("summer-sale.zip");

        // 1. Get an upload URL for the ZIP
        JsonNode upload = call("POST", "/uploads", """
            {"fileName": "summer-sale.zip", "sizeBytes": %d}
            """.formatted(Files.size(zip)));
        String uploadId = upload.get("id").asText();

        // 2. Send the bytes to the URL it returned
        HttpRequest put = HttpRequest.newBuilder(URI.create(upload.get("url").asText()))
            .PUT(HttpRequest.BodyPublishers.ofFile(zip))
            .build();
        http.send(put, HttpResponse.BodyHandlers.discarding());

        // 3. Complete the upload
        call("POST", "/uploads/" + uploadId + "/complete", null);

        // 4. Create the project; the ZIP becomes its first version
        JsonNode project = call("POST", "/projects", """
            {"name": "Summer sale", "zipUploadId": "%s", "fontLicenseAccepted": true}
            """.formatted(uploadId));
        String projectId = project.get("id").asText();
        String versionId = project.get("headVersionId").asText();

        // 5. Read the new version's problems and warnings
        JsonNode version = call("GET", "/versions/" + versionId, null);
        System.out.println("problems: " + version.get("problems") + ", warnings: " + version.get("warnings"));
    }
}
```
:::

The last request prints the new version's `problems` and `warnings`. [Step 4](#check-and-fix) explains them.

`fontLicenseAccepted: true` confirms you hold a license to render with the fonts in the ZIP. A ZIP with font files is refused without it ([fonts](/docs/blitframe/fonts#licensing)).

The second request sends the ZIP in one `PUT`, which works up to 100 MB. Upload a larger ZIP in parts ([multipart uploads](/docs/blitframe/uploads#multipart-uploads)). If the fourth request answers `202 Accepted`, the ZIP is still importing ([a slow import](#a-slow-import)).

## 4. Check and fix

The version's `problems` list anything that stops it rendering, such as a missing font. Its `warnings` list features that render differently or not at all, such as an unsupported effect. A version with `problems` can't be rendered. One with only `warnings` can.

To fix them, change the composition in After Effects and export it again. Then send the new export in one of two ways:

- Zip and upload it with requests 1 to 3, then import it as the project's next version with `POST /v1/projects/{projectId}/package` ([import into a project](/docs/blitframe/uploads#use-it)).
- [Edit the project](/docs/blitframe/projects#editing-a-project) with only the files that changed.

Then read the new version's `problems` and `warnings` again.

## 5. Render it

Once the version has no `problems`, render and download it with the quickstart's [Render it](/docs/blitframe/quickstart#render-it) and [Download the video](/docs/blitframe/quickstart#download-the-video) steps. Run them in the same shell or program as the requests above. They read the project's id from `PROJECT_ID` (`project_id`, `projectId` or `projectID` in the other languages). In Go and Java, add them at the end of `main`.

## Tips for fast renders

- **Use assets at the size you need.** An image or video larger than the composition costs render time and adds no detail.
- **Prefer MP4 for video without transparency.** Upright, limited-range, 8-bit 4:2:0 H.264 or HEVC in MP4, at most 4096 pixels on each side, is decoded on the GPU as it is. Other video is converted before its first render. Rotated phone footage is turned upright. Full-range or BT.2020 video is re-encoded with the BT.709 matrix in limited range, without converting BT.2020 colors. HDR is not tone-mapped, so export SDR in BT.709.
- **Expect alpha video to decode more slowly.** MOV or MP4 with alpha (ProRes 4444, Animation, PNG) is decoded without hardware acceleration. So is video converted to PNG in MOV, which happens to video without alpha whose width or height is odd. Other video without alpha is converted to H.264.
- **Keep precompositions shallow.** Each level of nesting adds work. Stay within three levels where you can.
- **Size precompositions to the output.** In a 1080p composition, avoid 4K precompositions unless the design scales them up.
- **Set colors on the layer, not with effects.** A Fill effect added only to recolor a layer costs render time.
- **Keep blurs moderate.** Blur radii above about 100–200 pixels slow rendering noticeably.
- **Use solids for plain rectangles.** A solid layer renders faster than a rectangular shape layer.

## Export with Bodymovin

On macOS, or if you prefer it, export with the free Bodymovin extension instead of Blitframe for After Effects. Install it from the [Adobe Exchange](https://exchange.adobe.com/apps/cc/12557/bodymovin) or with a ZXP installer app. To install it by hand, unzip the extension into the Common Extensibility Platform (CEP) folder for your system:

| System | Folder |
|---|---|
| Windows (all users, recommended) | `C:\Program Files\Common Files\Adobe\CEP\extensions\` |
| Windows (your user) | `C:\Users\<USERNAME>\AppData\Roaming\Adobe\CEP\extensions\` |
| macOS (all users) | `/Library/Application Support/Adobe/CEP/extensions/` |
| macOS (your user) | `~/Library/Application Support/Adobe/CEP/extensions/` |

Turn on **Allow Scripts to Write Files and Access Network** as in step 1. On macOS it is under **After Effects → Settings → Scripting & Expressions**. Then export as in step 2, from **Window → Extensions → Bodymovin**, with two composition settings:

- **Glyphs: off.** Blitframe renders text from the real font files, so it needs the font names, not glyph outlines.
- **Assets: not embedded.** Images and video stay separate files in the export folder.

In Bodymovin's settings, **Glyphs** (circled) is off and the export mode is **Standard**, which writes `data.json`:

![Bodymovin's Settings panel. The first option, Glyphs, is circled and switched off. Under Export Modes, Standard is selected.](/docs/blitframe/images/bodymovin-settings-glyphs.png)

Bodymovin leaves out three things that Blitframe for After Effects writes. Add them to `data.json` yourself:

| Left out | What to add |
|---|---|
| 3D model layers | The model file and its `ty:16` layer, as [Native models](/docs/blitframe/data-json-format#native-models) shows. |
| The size of adjustment layers | `sw` and `sh`. Without them, the layer's effects do not render, and the version's `warnings` say so ([adjustment layers](/docs/blitframe/data-json-format#adjustment-layers-and-cameras)). |
| Linear Burn, Linear Dodge, Vivid Light, Linear Light, Pin Light and Subtract | Bodymovin exports these blend modes as Normal. Set the layer's `bm` to the mode's number ([blend modes](/docs/blitframe/data-json-format#blend-modes-and-effects)). |

## Details

### A slow import

A large ZIP can take longer to import than the fourth request waits. That request then answers `202 Accepted` with the import instead of the project. Get `$BLITFRAME/projects/{projectId}/package/{importId}`, with the import's `projectId` and `id`, until its `status` is `succeeded` or `failed`. A succeeded import's `projectId` and `versionId` are the `PROJECT_ID` and `VERSION_ID` to use. A failed one's `error` says why ([large ZIPs](/docs/blitframe/uploads#large-zips)).

### Fitting text to its space

New copy in a template can be longer than its design allows. Add a `textFit` object to a text layer's text data (`t.textFit` in `data.json`). Blitframe then fits the text into the bounds of another layer, such as the shape behind a price:

```json
{"wrap":false,"shrink":"toFit","grow":"toFill","region":{"source":"layer","ref":"priceTag_bg","margin":10},"minSize":8,"maxSize":200}
```

| Key | Values | Meaning |
|---|---|---|
| `wrap` | `true`, `false` (default) | `false`: the size changes, as far as `shrink` and `grow` allow, so the widest line spans the region's width. `true`: the text wraps at the region's width. With `shrink` or `grow`, it takes the largest size whose lines fit the region. |
| `shrink` | `"none"`, `"toFit"` | `"toFit"` lets the size go down, to `minSize` at the least. |
| `grow` | `"none"`, `"toFill"` | `"toFill"` lets the size go up, to `maxSize` at the most. |
| `region.source` | `"layer"` | Fit to another layer in the same composition. Inline fitting has no other source. |
| `region.ref` | A layer name | The layer to fit into: a shape, solid, image, video, 3D model, precomposition or adjustment layer. Give it a unique name. |
| `region.margin` | Pixels | Space kept between the text and the region's edges. |
| `minSize`, `maxSize` | Pixels | The smallest and largest size. `minSize` is 1 by default. |

Use point text. The engine fits at most 15 text layers per composition, and the version's `warnings` list every rule it will skip. The [composition format reference](/docs/blitframe/data-json-format#text-and-fonts) and [text fitting](/docs/blitframe/text-fitting) have every rule. A [text fitting file](/docs/blitframe/text-fitting) can also fit text to its paragraph box, its original width or a rectangle, and keeps the rules outside `data.json`.
