diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-12 00:51:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-18 00:41:34 +0100 |
| commit | ac8e1c0859f9bac157c158ef189f9c1baf43437f (patch) | |
| tree | b26324ae2d28fbaa5f3aa6f84089c90f62c8fdcf /src/lib/render_text.cc | |
| parent | 5b3311e613d345e4c9d78c11dedd405ffc3f21ae (diff) | |
Support the 2014 version of SMPTE 428-7 in render_text.cc and use it
when placing subtitles (e.g. SRT). Also default to outputting 2014-era
alignment.
Diffstat (limited to 'src/lib/render_text.cc')
| -rw-r--r-- | src/lib/render_text.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index 702f848ac..99c4c06a8 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -253,7 +253,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom, { int y = 0; switch (first.valign_standard) { - case dcp::Standard::INTEROP: + case dcp::SubtitleStandard::INTEROP: + case dcp::SubtitleStandard::SMPTE_2014: switch (first.v_align()) { case dcp::VAlign::TOP: /* v_position is distance from top of frame to subtitle baseline */ @@ -269,7 +270,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom, break; } break; - case dcp::Standard::SMPTE: + case dcp::SubtitleStandard::SMPTE_2007: + case dcp::SubtitleStandard::SMPTE_2010: switch (first.v_align()) { case dcp::VAlign::TOP: /* v_position is distance from top of frame to top of subtitle */ |
