From: Carl Hetherington Date: Tue, 13 Sep 2016 14:28:52 +0000 (+0100) Subject: Fix STL italic / underline (from master). X-Git-Tag: v1.2.0~5 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=f187e4a08ca777c6e3e5de8037d165f9eea262f2;p=libsub.git Fix STL italic / underline (from master). --- diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index f1afa2c..05a01dc 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -284,6 +284,16 @@ sub::write_stl_binary ( text += "\x8A"; + /* 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); }