- Post
- #1394376
- Topic
- Project Threepio (Star Wars OOT subtitles)
- Link
- https://originaltrilogy.com/post/id/1394376/action/topic#1394376
- Time
Ah, that’s useful, thank you! I was trying with version 7.0.10-47 but I tried a few different ones, going back as far as 7.0.9-27, without any success. I have now tried 7.0.10-23 as well but no change there.
Googling the error message though I found this which made me think the issue is libpango, not imagemagick, and I’ve been using the same version of libpango every time.
I checked out that possibly-dodgy binary archive, and ImageMagick 7.0.10-23 on Windows used pango 1.42.4 which is a little older than any I had tried so far. Using that version on Linux works!
Seeing as this may be helpful to anyone else trying to do this, here’s my Dockerfile that I made to run these scripts. It should reliably and consistently create a working environment for running the Python scripts.
Rather than copy the Python script in I’m mounting the python folder, so I don’t need to rebuild if I edit the scripts. So I’m running it something like this:
docker build --tag subtitles .
docker run -it --name sub --mount type=bind,source="$(pwd)/out",target=/subs/out --mount type=bind,source="$(pwd)/python",target=/subs/python subtitles bash
The subtitles are still rendering but they look correct so far, so fingers crossed that’s it sorted now!
As for why it’s happening… I apologise if I’m teaching my grandmother to suck eggs here, but I think using random unassigned unicode codepoints for replacement characters is the issue, and seems likely to keep causing issues in the future, seeing as no tool will really know how to handle them. I was wondering if you had a reason to do it this way rather than adjusting the kerning in the truetype font file instead? Again, my apologies if this is something you’ve already considered and had a reason not to use!