Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.
TypeScript agentic-aiaiai-agentsai-videocompilerdslffmpeggenerative-aillmmarkup-languagemonorepoplugin-systemprogramming-languagetext-to-videotypescriptvideovideo-automationvideo-clonevideo-editingvideo-generation
fix: give the Cue's height envelope room for the outline it draws (#71)
rponeawaf415fb156fdb
diff --git a/packages/caption-fine/src/manifest.ts b/packages/caption-fine/src/manifest.tsindex ca750143..5b4b27cc 100644--- a/packages/caption-fine/src/manifest.ts+++ b/packages/caption-fine/src/manifest.ts@@ -145,7 +145,7 @@ export const captionFineMarkupSurfaces = [{ name: "stroke-color", required: false, fallback: "#000000",summary: "Paints the outline drawn around each glyph." },{ name: "stroke-width", required: false, fallback: "0",- summary: "Sets the glyph outline thickness in pixels. The outline is placed outside the letter, so the whole width shows and the letterform keeps its shape. An outline that only has to separate the caption from the picture behind it is thin — around a twentieth of `size`, so roughly 2px at a `size` of 46. It grows quickly: past about a tenth of `size` neighbouring letters meet, the gaps between them close, and the caption reads as a slab rather than as words." },+ summary: "Sets the glyph outline thickness in pixels, and the number that matters is its share of `size`: about a twentieth. At a `size` of 46 that is 2px, at 54 it is 3px. Write it from `size` every time rather than picking a pixel count, because the whole width shows — the outline is placed outside the letter, so it keeps the letterform but grows into the space around it twice as fast as a centred one would. Past about a tenth of `size` neighbouring letters meet, the counters fill in, and the caption reads as a slab rather than as words." },{ name: "shadow-color", required: false, fallback: "#000000",summary: "Paints the soft drop shadow behind each glyph." },{ name: "shadow-opacity", required: false, fallback: "0",@@ -187,7 +187,7 @@ export const captionFineMarkupSurfaces = [{ name: "active-stroke-color", required: false, fallback: "stroke-color",summary: "Paints the outline around the Word being spoken." },{ name: "active-stroke-width", required: false, fallback: "stroke-width",- summary: "Sets the active glyph outline thickness in pixels. It inherits `stroke-width`, and the same proportion holds: emphasis on the spoken Word is carried by its Paint, so thickening its outline past the rest buys little and closes the gaps between its letters first." },+ summary: "Sets the active glyph outline thickness in pixels. It inherits `stroke-width`, and the same share of `size` holds: emphasis on the spoken Word is carried by its Paint, so thickening its outline past the rest buys little and closes the gaps between its letters first." },{ name: "active-shadow-color", required: false, fallback: "shadow-color",summary: "Paints the drop shadow behind the Word being spoken." },{ name: "active-shadow-opacity", required: false, fallback: "shadow-opacity",diff --git a/packages/caption-fine/src/render.ts b/packages/caption-fine/src/render.tsindex b72a4ef8..fa362e95 100644--- a/packages/caption-fine/src/render.ts+++ b/packages/caption-fine/src/render.ts@@ -651,7 +651,13 @@ function cueElements({ name: "max-width", value: "100%" },...(parameters.layout.maxLines === undefined ? [] : [{name: "max-height",- value: `${compactNumber(parameters.typography.fontSizePx * parameters.layout.lineHeight * parameters.layout.maxLines + parameters.cueBox.paddingYPx * 2)}px`,+ // The line boxes, the padding, and the room the outline needs above the first and below the+ // last. `max-lines` is accepted only with `overflow: clip`, so this height is enforced: left+ // at the type metrics alone it cut the outline off the top and bottom rows, most visibly on a+ // Cue of two lines, where both ends are an edge.+ value: `${compactNumber(parameters.typography.fontSizePx * parameters.layout.lineHeight * parameters.layout.maxLines+ + parameters.cueBox.paddingYPx * 2+ + Math.max(parameters.basePaint.stroke.widthPx, parameters.activePaint.stroke.widthPx) * 2)}px`,}] as const),{ name: "overflow", value: parameters.layout.overflow === "clip" ? "hidden" : "visible" },{ name: "padding", value: `${compactNumber(parameters.cueBox.paddingYPx)}px ${compactNumber(parameters.cueBox.paddingXPx)}px` },