GNOME Bugzilla – Bug 780402
ttml: Correctly render blocks containing text of multiple sizes
Last modified: 2017-04-09 07:44:20 UTC
The ttml plugin doesn't correctly handle subtitle blocks that contain elements with different text sizes. This manifests itself as a varying baseline separation between lines of text, with the result that text is incorrectly position with respect to its background rectangles. Patchset to follow...
Created attachment 348493 [details] TTML file demonstrating the problem The attached file demonstrates the problem. It can be presented by running the following command: gst-launch-1.0 ttmlrender name=r videotestsrc pattern="gradient" ! video/x-raw,width=1280,height=720 ! autovideoconvert ! r.video_sink filesrc blocksize=16777216 location=line-height-test.xml ! ttmlparse ! r.text_sink r. ! ximagesink
Created attachment 348495 [details] [review] ttmlrender: put all functions in gst_ttml_render namespace
Created attachment 348496 [details] [review] ttmlrender: store PangoLayout in object state
Created attachment 348497 [details] [review] ttmlrender: rename TextRange type and its fields
Created attachment 348498 [details] [review] ttml: add refcounting to GstSubtitleStlyeSet type
Created attachment 348499 [details] [review] ttmlrender: extend UnifiedBlock type
Created attachment 348500 [details] [review] ttmlrender: extend UnifiedElement type to include font metrics
Created attachment 348501 [details] [review] ttmlrender: add facility to stitch images in both directions
Created attachment 348502 [details] [review] ttmlrender: apply correct line height to blocks with multiple text sizes
Created attachment 348503 [details] [review] ttml: correctly implement lineHeight behaviour
Created attachment 348504 [details] [review] ttmlrender: relocate type definitions to head of file
Created attachment 348505 [details] [review] ttmlrender: improve function comments/descriptions
Created attachment 348506 [details] [review] ttmlparse: don't leak caps
Attachment 348496 [details] pushed as ac91886 - ttmlrender: store PangoLayout in object state Attachment 348498 [details] pushed as 9f0a062 - ttml: add refcounting to GstSubtitleStlyeSet type Attachment 348499 [details] pushed as aec8406 - ttmlrender: extend UnifiedBlock type Attachment 348502 [details] pushed as f28df30 - ttmlrender: apply correct line height to blocks with multiple text sizes Attachment 348503 [details] pushed as 0288ee2 - ttml: correctly implement lineHeight behaviour Attachment 348504 [details] pushed as ada24bd - ttmlrender: relocate type definitions to head of file Attachment 348505 [details] pushed as 60bcf63 - ttmlrender: improve function comments/descriptions