Commit f2e43bd7 authored by Committed by Jean-Baptiste KempfBrowse files
Subtitle renderers: Merge RenderText & RenderHTML
The current workflow is often parsing a subtitle format, then convert it in a common HTML and then push it to the renderer as HTML. The renderer will reparse the HTML and try to render it. Of course, that means that only one renderer can do that correctly, and so we bloat the freetype renderer as much as we can. It also means that we have 2 render callbacks for subtitles, one for normal text and one for styled text, and we sometimes reparse the HTML to remove the tags, for the first. We now only use a text_segment, with new segments at every style change; an unique render function and the renderer can decide to honor or not the style. It's a big commit, so regressions can arise, but it was tested for most common cases.