05.08.2021, 01:00
Did some research on Substation alpha (.ssa/.ass) and .ttf/.otf formats after noticing that hybrid appends the Job ID prefix to attachments yet it still works correctly...
Seems like libass & VSfilter doesn't look at the filename at all!
The container (usually matroska) gives it a list of local attachments, libass\vsfilter queries the files and looks for the internal values for font format and font family then concatenates the same font family together to build up a local font cache for the subtitles to use.
The .ass format in it's style section takes a font_family or font_sub_family value, looks at the font cache and if it can't find it then it goes to the system default (Arial on windows).
Tested this by looking at a known font at a certain timestamp, removing it, noting that the subtitle changed to Arial, changed the font extension from .otf to .ttf and attached it back and the correct font was shown then removed the font again and removed the file extension entirely, reattached it and it rendered correctly (mkvtools listed it's MIME type as "font/otf".
So realistically it doesn't matter what the filename, filecharactercase or even extension is as long as the container tells the subtitle library executable that it's a font!
That said hybrid probably shouldn't be sticking the jobID prefix to attachment names as it might break something somewhere.
Easiest solution would be to extract to a jobID folder with the proper original file names, ASSume duplicates contain the same data & let them overwrite the other, stick whatever is left into the new output file and simply delete the folder at the end?
Seems like libass & VSfilter doesn't look at the filename at all!
The container (usually matroska) gives it a list of local attachments, libass\vsfilter queries the files and looks for the internal values for font format and font family then concatenates the same font family together to build up a local font cache for the subtitles to use.
The .ass format in it's style section takes a font_family or font_sub_family value, looks at the font cache and if it can't find it then it goes to the system default (Arial on windows).
Tested this by looking at a known font at a certain timestamp, removing it, noting that the subtitle changed to Arial, changed the font extension from .otf to .ttf and attached it back and the correct font was shown then removed the font again and removed the file extension entirely, reattached it and it rendered correctly (mkvtools listed it's MIME type as "font/otf".
So realistically it doesn't matter what the filename, filecharactercase or even extension is as long as the container tells the subtitle library executable that it's a font!
That said hybrid probably shouldn't be sticking the jobID prefix to attachment names as it might break something somewhere.
Easiest solution would be to extract to a jobID folder with the proper original file names, ASSume duplicates contain the same data & let them overwrite the other, stick whatever is left into the new output file and simply delete the folder at the end?