@shotstack/cli 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shotstack.js +30 -30
- package/package.json +1 -1
- package/skills/shotstack/references/fonts.md +7 -3
- package/skills/shotstack/references/svg.md +1 -1
- package/skills/shotstack/references/timeline.md +1 -1
- package/skills/shotstack/references/troubleshooting.md +4 -4
- package/skills/shotstack/shared/agent-core.md +3 -3
package/package.json
CHANGED
|
@@ -32,7 +32,11 @@ Load a font from a public URL via `timeline.fonts[]`, then reference its **file
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The `font.family` value is the URL's filename without extension,
|
|
35
|
+
The `font.family` value is the URL's filename without extension, matched ignoring case (a `-Regular` or `-Bold` style suffix can also be dropped). For URL `https://fonts.gstatic.com/s/montserrat/v31/JTUSjIg1_i6t8kCHKm45xW5rygbi49c.ttf`, family = `JTUSjIg1_i6t8kCHKm45xW5rygbi49c`.
|
|
36
|
+
|
|
37
|
+
The family name stored inside the font file also matches, but it isn't always the name on Google Fonts: a variable font whose default weight isn't Regular stores the weight too (Space Grotesk's file calls itself `Space Grotesk Light`). Prefer the filename, which can't differ from what you loaded.
|
|
38
|
+
|
|
39
|
+
A `font.family` that matches nothing renders in Roboto without a render error. The exception is a lone entry in `timeline.fonts[]`, which is used whatever `font.family` says, so a wrong name stays hidden until a second font is added. `shotstack validate` warns on any `font.family` that isn't a built-in or a loaded filename.
|
|
36
40
|
|
|
37
41
|
## Verified font catalogue
|
|
38
42
|
|
|
@@ -77,9 +81,9 @@ These twelve fonts are pre-installed in the render engine and don't need a `time
|
|
|
77
81
|
|
|
78
82
|
The renderer accepts both spaced (`Open Sans`) and concatenated (`OpenSans`) family names for these.
|
|
79
83
|
|
|
80
|
-
## Why system fonts
|
|
84
|
+
## Why system fonts don't work
|
|
81
85
|
|
|
82
|
-
System fonts like `Arial`, `Helvetica`, `Times New Roman`, `Courier New`, etc. are **not installed** on the render engine.
|
|
86
|
+
System fonts like `Arial`, `Helvetica`, `Times New Roman`, `Courier New`, etc. are **not installed** on the render engine. Text set in them renders in Roboto, with no render error.
|
|
83
87
|
|
|
84
88
|
**Wrong:**
|
|
85
89
|
|
|
@@ -11,7 +11,7 @@ The `svg` asset type embeds raw SVG markup into a clip. Use it for vector shapes
|
|
|
11
11
|
|
|
12
12
|
## Required attributes
|
|
13
13
|
|
|
14
|
-
Every SVG asset's `src` is
|
|
14
|
+
Every SVG asset's `src` is the markup itself, starting with `<svg`. A URL or `data:image/svg+xml` URI isn't accepted: Studio shows an empty placeholder and the render fails. (Data URIs belong inside `html5` assets only.) The markup **must include all four** of:
|
|
15
15
|
|
|
16
16
|
- `xmlns="http://www.w3.org/2000/svg"`
|
|
17
17
|
- `viewBox` defining the coordinate space
|
|
@@ -114,7 +114,7 @@ Custom fonts loaded from a URL, available to all `rich-text` and `rich-caption`
|
|
|
114
114
|
}
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Reference a loaded font in `font.family` by the **basename of the file** (without `.ttf`/`.otf`/`.woff`). It always matches; a family that matches nothing renders in Roboto without an error.
|
|
118
118
|
|
|
119
119
|
For the Montserrat URL above, `font.family` is `JTUSjIg1_i6t8kCHKm45xW5rygbi49c`.
|
|
120
120
|
|
|
@@ -7,7 +7,7 @@ Common errors and the fix for each. **Catch most of them before rendering:** `sh
|
|
|
7
7
|
- "Unknown property: alignment" / wrong property names
|
|
8
8
|
- "Invalid option: expected one of top|middle|bottom"
|
|
9
9
|
- Video looks stretched / squishing after rendering
|
|
10
|
-
-
|
|
10
|
+
- Text renders in Roboto instead of your font
|
|
11
11
|
- Captions cover the whole frame
|
|
12
12
|
- Clips flicker / "clips overlap" on one track
|
|
13
13
|
- Timeline renders but layers are wrong
|
|
@@ -54,11 +54,11 @@ The Shotstack `fit` enum is **inverted from CSS**:
|
|
|
54
54
|
|
|
55
55
|
**Fix:** use `fit: "crop"` (or omit `fit` — `crop` is the default) for the typical "scale and crop" behaviour you'd expect from CSS `object-fit: cover`.
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## Text renders in Roboto instead of your font
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
`font.family` didn't match any font, so the renderer fell back to Roboto without an error. Either the font isn't built in and wasn't loaded via `timeline.fonts[]`, or `family` doesn't match the loaded font: a typo, or a name that differs from the one stored in the font file.
|
|
60
60
|
|
|
61
|
-
**Fix:** add the font URL to `timeline.fonts[]` and use the file basename as `family`. See `references/fonts.md`. If you really need a system font, use `Roboto` (built-in) as a substitute.
|
|
61
|
+
**Fix:** add the font URL to `timeline.fonts[]` and use the file basename as `family`. `shotstack validate` flags a `family` that isn't a built-in or a loaded filename. See `references/fonts.md`. If you really need a system font, use `Roboto` (built-in) as a substitute.
|
|
62
62
|
|
|
63
63
|
## Captions cover the whole frame
|
|
64
64
|
|
|
@@ -222,7 +222,7 @@ Use only the **current** asset types; the deprecated ones still parse but should
|
|
|
222
222
|
| `image` | Static image — `jpg`, `png`, `webp`, `gif`, `bmp`, `tiff`. |
|
|
223
223
|
| `audio` | Audio clip placed at a specific time on the timeline. |
|
|
224
224
|
| `rich-text` | Styled text overlay with full typography control. **Use this instead of `text`/`html`/`title`.** |
|
|
225
|
-
| `svg` | Vector graphics from raw SVG markup. See `references/svg.md`. |
|
|
225
|
+
| `svg` | Vector graphics from raw SVG markup: `src` starts with `<svg`, never a URL or `data:` URI (the render fails). See `references/svg.md`. |
|
|
226
226
|
| `html5` | Self-contained HTML/CSS/JS page rendered in an iframe (motion graphics, charts, animated overlays). Preloads gsap/d3/anime/lottie. See `references/html5.md`. **Never use the deprecated `html` asset.** |
|
|
227
227
|
| `rich-caption` | Word-level animated captions sourced from audio, video, or subtitle files. See `references/caption.md`. |
|
|
228
228
|
| `luma` | Luma matte for masking effects. |
|
|
@@ -264,7 +264,7 @@ One overlay is a `rich-text` job. **Several videos "in different styles" is not*
|
|
|
264
264
|
|
|
265
265
|
## Fonts
|
|
266
266
|
|
|
267
|
-
Use **custom Google Fonts via `timeline.fonts[]`**. System fonts (`Arial`, `Helvetica`, `Times New Roman`) are NOT installed
|
|
267
|
+
Use **custom Google Fonts via `timeline.fonts[]`**. System fonts (`Arial`, `Helvetica`, `Times New Roman`) are NOT installed; text set in them renders in Roboto, with no render error.
|
|
268
268
|
|
|
269
269
|
**CRITICAL: Do NOT construct or fabricate Google Fonts URLs from memory.** Google rotates them (`v26 → v31 → ...`) and the hash filenames change with each version. Any URL you reconstruct from training data is almost certainly a 404. **Use ONLY the verified entries below, copied verbatim.**
|
|
270
270
|
|
|
@@ -313,7 +313,7 @@ Variable fonts cover the full weight range (100–900) from a single URL — set
|
|
|
313
313
|
}
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
Use the `family` column from the table above: the URL's filename without `.ttf`, matched ignoring case. The family name stored inside the font file also matches, but it isn't always the name on Google Fonts (Space Grotesk's file calls itself `Space Grotesk Light`), so the filename is the safe choice. A `font.family` that matches nothing renders in Roboto with no error. The exception is a lone entry in `timeline.fonts[]`, which is used whatever `font.family` says, so a wrong name only shows once a second font is added. `shotstack validate` warns on any `font.family` that isn't a built-in or a loaded filename.
|
|
317
317
|
|
|
318
318
|
## Top 5 mistakes
|
|
319
319
|
|