Skip to content

Commit 0c940b7

Browse files
Extract embedded fonts if available
Set ass_set_extract_fonts(ass_library, 1); the same way as tests/tools use to load embedded fonts in .ass Execute ass_clear_fonts(ass_library); on removeTrack() to clear any in-memory fonts that have been loaded.
1 parent 932a08b commit 0c940b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SubtitleOctopus.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ class SubtitleOctopus {
295295
}
296296

297297
ass_set_message_cb(ass_library, msg_callback, NULL);
298+
ass_set_extract_fonts(ass_library, 1);
298299

299300
ass_renderer = ass_renderer_init(ass_library);
300301
if (!ass_renderer) {
@@ -334,6 +335,7 @@ class SubtitleOctopus {
334335
ass_free_track(track);
335336
track = NULL;
336337
}
338+
ass_clear_fonts(ass_library);
337339
}
338340
/* TRACK */
339341

0 commit comments

Comments
 (0)