summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-04 22:39:02 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-04 22:39:02 +0100
commit94d2127b2f9227b31e5947318a4d8f974a43cb57 (patch)
tree36f3208097c6b6c03a67d58505f4bed8857f68bd /src
parent8815947e104a72729f1d47002d9f58047a19ccb5 (diff)
Turn italic/underline off, if required, at the end of each STL subtitle.
Diffstat (limited to 'src')
-rw-r--r--src/stl_binary_writer.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc
index d331160..930cbc9 100644
--- a/src/stl_binary_writer.cc
+++ b/src/stl_binary_writer.cc
@@ -320,6 +320,16 @@ sub::write_stl_binary (
text += utf16_to_iso6937 (utf_to_utf<wchar_t> (k->text));
}
}
+
+ /* Turn italic/underline off before the end of this subtitle */
+
+ if (underline) {
+ text += "\x83";
+ }
+
+ if (italic) {
+ text += "\x81";
+ }
if (text.length() > 111) {
text = text.substr (111);