Closed glhvta closed 4 years ago
Sounds reasonable. Do you have any sample TTML we could use for testing and development?
yes, in this archive, you can find samples TTML with fontSize attribute in percentages and in cellResolution unit.
Perfect. Thanks!
Have you read the FAQ and checked for duplicate open issues? Yes
What version of Shaka Player are you using? v2.5.9
Please ask your question Hi,
According to the TTML spec fontSize https://www.w3.org/TR/ttml1/#style-attribute-fontSize fontSize value can be percentage or scalar in the next units
https://www.w3.org/TR/ttml1/#style-value-length
We have ttml subs with the next styles
tts:fontSize="0.80c" is in cellResolution units
We are using the default shaka.text.TtmlTextParser And seems like fontSize will not be provided to the text displayer in this case, as now default TtmlTextParser does not support cellResolution units for the font size.
https://github.com/google/shaka-player/blob/697a6ff785046dff3b7dea1d44fc8fc87cee925b/lib/text/ttml_text_parser.js#L531-L535
https://github.com/google/shaka-player/blob/697a6ff785046dff3b7dea1d44fc8fc87cee925b/lib/text/ttml_text_parser.js#L971-L977
Is it possible to add the support of fontSize cellResolution units to TtmlTextParser?
Thanks!