From 3c802dd6d1451c2c8a7e188f8379738d72e907eb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 14 Oct 2023 21:48:25 +0200 Subject: Fix DCP content font ID allocation to cope with DCPs that have multiple fonts with the same name in the same reel (#2600). Previously we had this id_for_font_in_reel() which would give an ID of N_font-ID. This means we got duplicate font IDs. Here we replace that method with FontAllocator, which gives an ID of N_font-ID for the first font and M_font-ID, where M is a number higher than the highest reel index. The idea is to support the required new IDs without breaking exisiting projects. There is some documentation of how it works in doc/design/fonts --- src/lib/dcp_decoder.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/dcp_decoder.cc') diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index e72573ebc..0a57ce7f5 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -23,6 +23,7 @@ #include "audio_content.h" #include "audio_decoder.h" #include "config.h" +#include "constants.h" #include "dcp_content.h" #include "dcp_decoder.h" #include "digester.h" @@ -136,6 +137,9 @@ DCPDecoder::DCPDecoder (shared_ptr film, shared_ptrid(), is_copy.font().get_value_or(""))); strings.push_back(is_copy); } -- cgit v1.2.3