TTML: set default font size for ttml subtitles on parent element #1191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After investigating a weird subtitles cropping issue on some set-top boxes, we found out that the space between subtitle lines were in some situations not proportional to the choosen font's size of those same elements, leading after resizing elements to the impression that a line break was being "too large".
For example, reducing a text track element enough may lead to space between lines being too large. In the end, that space (though we're only talking in our case to 2 or 3 pixel higher than it should be) may lead to subtitles being cropped.
Reasons behind this non-proportionality seems linked to a browser's default rendering rules on which I'm not well versed. However a simple fix that seems logical - which is setting the default font-size to the parent elements of those subtitles (which should not break anything) - seems to fix the issue.
I'm not sure why this fixes things, as in my comprehension it shouldn't change anything, yet it does not seem to change in any way cases that were previously working and this new CSS logic theoretically still appears sound to me.