mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-14 19:26:59 -04:00
fix: document that the caption track margin is a fraction of the frame height
captions.setStyle {margin: 60} (pixels, as one would guess) was silently clamped to 0.45 and
put subtitles mid-frame. The parameter doc and docs/captions.md now give the unit and range.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a2517bff08
commit
d90b9c8ee2
2 files changed
+3
-2
No files matched your search
@@ -296,7 +296,7 @@ pub fn commands() -> Vec<CommandSpec> {
|
||||
"Caption Track Style",
|
||||
&[],
|
||||
None,
|
||||
r##"{"track":id|"C1","font":str?,"size":f32?,"color":"#rrggbb[aa]"?,"background":bool?,"backgroundColor":"#rrggbbaa"?,"align":"left|center|right"?,"anchor":"top|middle|bottom"?,"margin":f32?,"lineSpacing":f32?,"outline":f32?,"outlineColor":str?,"reset":bool?}"##,
|
||||
r##"{"track":id|"C1","font":str?,"size":f32?,"color":"#rrggbb[aa]"?,"background":bool?,"backgroundColor":"#rrggbbaa"?,"align":"left|center|right"?,"anchor":"top|middle|bottom"?,"margin":0..0.45 (fraction of frame height)?,"lineSpacing":f32?,"outline":f32?,"outlineColor":str?,"reset":bool?}"##,
|
||||
has_caption_track,
|
||||
|s, p| {
|
||||
let tid = track_param(s, p).ok_or_else(|| bad("captions.setStyle", "no such caption track"))?;
|
||||
|
||||
+2
-1
@@ -11,7 +11,8 @@ version 2; version 1 projects open with no caption tracks).
|
||||
burned in on export), lock, sync lock, and a **track style**:
|
||||
font size (pixels at 1080 lines, scaled to the frame), text colour, background box and its colour,
|
||||
outline width and colour, alignment (left/centre/right), position (top/middle/bottom) and
|
||||
margin, line spacing.
|
||||
margin (a fraction of the frame height, default 0.08; `captions.setStyle` clamps it to 0–0.45),
|
||||
line spacing.
|
||||
- **Caption**: in/out in exact `Tick`s, text (lines separated by `\n`; `<i>`, `<b>`, `<u>` kept
|
||||
as written), optional speaker, and the WebVTT cue id and cue settings, kept for round trips.
|
||||
Captions on a track never overlap.
|
||||
|
||||
Reference in new issue
Block a user