From 5a820bb8fae34591be5ac6d19a73461b9dab532a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 1 Jun 2022 13:03:38 +0200 Subject: Rearrange subtitle font management. With this change each subtitle coming out of the player has a reference to a dcpomatic::Font that belongs to the TextContent. This hopefully solves a few problems which all basically stemmed from the fact that previously the decoders/player were deciding what the font ID in the output DCP would be - they can't do that properly. --- src/lib/subtitle_encoder.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/subtitle_encoder.cc') diff --git a/src/lib/subtitle_encoder.cc b/src/lib/subtitle_encoder.cc index ba47e1231..2331eb52a 100644 --- a/src/lib/subtitle_encoder.cc +++ b/src/lib/subtitle_encoder.cc @@ -20,7 +20,6 @@ #include "compose.hpp" -#include "font_data.h" #include "job.h" #include "player.h" #include "subtitle_encoder.h" @@ -121,7 +120,7 @@ SubtitleEncoder::go () if (!_film->interop() || _include_font) { for (auto j: _player->get_subtitle_fonts()) { - i.first->add_font (j.id, _default_font); + i.first->add_font(j->id(), j->data().get_value_or(_default_font)); } } -- cgit v1.2.3