Cleanup: use std::vector and extract utf8_to_utf16().
[dcpomatic.git] / src / lib / hints.cc
index 027510eca8015dafa55c9e38c32b04a261fd7fe4..b628efc31534fd53be7c7c8d29350ceab88363c3 100644 (file)
 #include "audio_processor.h"
 #include "compose.hpp"
 #include "config.h"
+#include "constants.h"
 #include "content.h"
 #include "cross.h"
 #include "dcp_content_type.h"
 #include "film.h"
 #include "font.h"
-#include "font_data.h"
 #include "hints.h"
 #include "maths_util.h"
 #include "player.h"
 #include "ratio.h"
 #include "text_content.h"
-#include "types.h"
 #include "video_content.h"
 #include "writer.h"
 #include <dcp/cpl.h>
@@ -419,6 +418,8 @@ try
        struct timeval last_pulse;
        gettimeofday (&last_pulse, 0);
 
+       _writer->write (player->get_subtitle_fonts());
+
        while (!player->pass()) {
 
                struct timeval now;
@@ -438,7 +439,6 @@ try
                check_loudness ();
        }
 
-       _writer->write (player->get_subtitle_fonts());
 
        if (_long_subtitle && !_very_long_subtitle) {
                hint (_("At least one of your subtitle lines has more than 52 characters.  It is recommended to make each line 52 characters at most in length."));