subtitle renderer

by adamantpenguin
See Code Download Embed
portable subtitle renderer that uses snap lists as its format and implements a reasonable subset of webvtt features including:
- timed text (obviously)
- horizontal and vertical alignment and maximum width
- automatic wrapping as well as explicit line breaks
- variable font size and colours, with customisable palette
- screen margins in which no text will be rendered (caption background may be though)
- multiple independent captions at once

the format can be converted to and from json without problems, so an external tool could be written to convert existing subtitle files to the format understood by these blocks

Created September 30, 2023

Last updated October 1, 2023

Published September 30, 2023