Vertical positioning of subtitles & SMPTE standard versions

Anything and everything to do with DCP-o-matic.
HaroldHallikainen
Posts: 18
Joined: Mon Apr 27, 2020 9:54 pm

Re: Vertical positioning of subtitles & SMPTE standard versions

Post by HaroldHallikainen »

I agree with your test results. The big difference from the tests I analyzed was that the text was vertical. Most systems did vertical positioning based on the bounding box. One used the horizontal baseline of the top, bottom, or center character as appropriate. I believe they should be using the vertical origin, but this is not what the standard says, and font compressors remove vertical metrics.

For horizontal text, the differences I recall seeing had to do with slight differences in horizontal position and conversion to bold.

As I recall, the standard calls for horizontal positioning based on the bounding box of the first and/or last character. It gets interesting if the first character is a space character, since it has no bounding box. I think horizontal positioning should be based on the horizontal position of the horizontal origin, which is slightly to the left of the bounding box. For Halign="right", it would be on the horizontal origin of the last character PLUS the advance width of the last character (which puts us at the origin of the next character if there were one). However, the difference between use of the horizontal origin and the bounding box is typically small (unless the first character is a space). Our test used the pipe character (|) since the left side of the bounding box is farther away from the horizontal origin than for any other character (that I can think of).

For conversion to bold, the standard says something like increase the stroke width by 5%. But font files do not define strokes and widths. Instead, they define the outline of a character. I SUSPECT bold is actually being accomplished by double rendering the character with a slight horizontal and vertical offset. This is the same way we used to make bold characters on a typewrite (by overtyping).

Harold