0

In an attempt to convert a ttml file into a webvtt file, I've been trying to set a font size in cues, but without css styling. For instance, instead of:

WEBVTT

STYLE
::cue {
  font-size: 80%
}

I would like to have the font size attribute to appear in the cues:

00:00:00.000 --> 00:00:4.000 font-size: 80%
This is sized at 80%

I've tried using size: 80%, but apparently that's unrelated to font size.

Is there any way this could be accomplished?

Thanks in advance

Fishay
  • 1

1 Answers1

0

The settings that can be specified on the cue are specified at:

https://www.w3.org/TR/webvtt1/#cue-settings

and those that can be specified on text within the cure are at:

https://www.w3.org/TR/webvtt1/#caption-text

Font size is not one of them.

  • Thanks. Is there a way to convert the TTML file whilst also keeping the font size for each caption? I don't believe it would be possible to add a WEBVTT style for each caption's font size (as each caption's font size can be unique - would adding up to 90 different styles for each font size be really viable? I don't think so...) – Fishay Aug 28 '22 at 08:34
  • Can you clarify what you man by "90 different styles for each font size be really viable"? Do you mean that you might use 90 different font sizes in a single document? I might be possible to set the font size using CSS and the ::cue pseudo-class: ``` video::cue(.large) { font: 14pt; }``` – Pierre-Anthony Lemieux Sep 25 '22 at 21:50