diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-20 23:41:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-22 02:37:53 +0100 |
| commit | ddcd4f3ba0af3e9d49dbb68127317cd0d871a248 (patch) | |
| tree | 1091683b8dcaf82cd517b844be1d76f290f88f50 /src/lib/writer.cc | |
| parent | bf4446523dd891049cabf1bcd68d20def57bc731 (diff) | |
Pass fonts from content around as FontData.
i.e. as a block of memory rather than a file. Also, get the
fonts from the decoder rather than the content.
Together, these changes allow us to use fonts from SMPTE DCPs
added as content. Before, fonts would be messed up in those
cases (#1885).
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index fcf084c56..77a6bb589 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -32,7 +32,7 @@ #include "cross.h" #include "audio_buffers.h" #include "version.h" -#include "font.h" +#include "font_data.h" #include "util.h" #include "reel_writer.h" #include "text_content.h" @@ -792,14 +792,14 @@ Writer::write (PlayerText text, TextType type, optional<DCPTextTrack> track, DCP } void -Writer::write (list<shared_ptr<Font> > fonts) +Writer::write (vector<FontData> fonts) { /* Just keep a list of unique fonts and we'll deal with them in ::finish */ - BOOST_FOREACH (shared_ptr<Font> i, fonts) { + BOOST_FOREACH (FontData const& i, fonts) { bool got = false; - BOOST_FOREACH (shared_ptr<Font> j, _fonts) { - if (*i == *j) { + BOOST_FOREACH (FontData const& j, _fonts) { + if (i == j) { got = true; } } |
