sandflow / ttconv

Subtitle conversion. Converts STL, SRT, TTML and SCC into TTML, WebVTT and SRT.
BSD 2-Clause "Simplified" License
187 stars 22 forks source link

TTML writer should not output cell units #336

Open palemieux opened 2 years ago

palemieux commented 2 years ago

In IMSC, "c" units are only permitted on the ebutts:linePadding property.

Instead TTML writer should allow the user to specify that rh and rw units are used.

palemieux commented 1 year ago

rh and rw units cannot replace c units directly since the value of c depends on whether c is evaluated in a horizontal or vertical context. In the case of padding, for example, this cannot be determine without determining the computed value of tts:writingMode, which itself requires determining the region with which the element is associated.

It might therefore make more sense to limit the model such that only c units can be used with ebutts:linePadding, i.e. enforcing the IMSC model.