published: python3 check-font.py Mukta-Regular.ttf captions.srt run: .././venv/bin/python check-font.py fonts/Mukta-Regular.ttf captions.srt exit=0 | Mukta: code points needed=27 missing=0 [] | words=13 glyphs=46 notdef_glyphs=0 | glyphs for 3 code points of ksha=1 published: python3 check-font.py Mukta-Regular.ttf captions.srt run: .././venv/bin/python check-font.py fonts/Mukta-Regular.ttf captions-edge.srt exit=0 edge: BOM + CRLF SRT with Devanagari digits, danda and OM sign | Mukta: code points needed=21 missing=0 [] | words=6 glyphs=19 notdef_glyphs=0 | glyphs for 3 code points of ksha=1 published: python3 check-font.py Mukta-Regular.ttf captions.srt run: .././venv/bin/python check-font.py ../fonts/Inter-Bold.ttf captions.srt exit=1 edge: Latin-only font: exit 1 is the expected answer | Inter: code points needed=27 missing=27 ['0x902', '0x915', '0x91c', '0x91e', '0x91f', '0x922', '0x924', '0x926'] | words=13 glyphs=73 notdef_glyphs=73 | glyphs for 3 code points of ksha=3 published: fc-scan --format "%{family}\n" Mukta-Regular.ttf run: fc-scan --format "%{family}\n" fonts/Mukta-Regular.ttf exit=0 | Mukta published: fc-scan --format "%{family}\n" Mukta-Regular.ttf run: fc-scan --format "%{family}\n" fonts/TiroDevanagariHindi-Regular.ttf exit=0 edge: family name with spaces | Tiro Devanagari Hindi published: fc-scan --format "%{family}\n" Mukta-Regular.ttf run: fc-scan --format "%{family}\n" fonts/Baloo2.ttf exit=0 edge: variable font lists named instances, one family name repeated | Baloo 2 | Baloo 2 | Baloo 2 | Baloo 2 published: ffmpeg -i captions.srt captions.ass run: ffmpeg -hide_banner -loglevel error -y -i captions.srt captions.ass exit=0 published: ffmpeg -i captions.srt captions.ass run: ffmpeg -hide_banner -loglevel error -y -i captions-edge.srt captions-edge.ass exit=0 edge: BOM + CRLF SRT converts cleanly published: sed 's/^Style: Default,[^,]*,[0-9]*,/Style: Default,Mukta,24,/' captions.ass > styled.ass run: sed 's/^Style: Default,[^,]*,[0-9]*,/Style: Default,Mukta,24,/' captions.ass > styled.ass exit=0 published: sed 's/^Style: Default,[^,]*,[0-9]*,/Style: Default,Mukta,24,/' captions.ass > styled.ass run: sed 's/^Style: Default,[^,]*,[0-9]*,/Style: Default,Tiro Devanagari Hindi,24,/' captions-edge.ass > styled-edge.ass exit=0 edge: family name with spaces published: ffmpeg -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -c:a copy output.mp4 run: ffmpeg -hide_banner -loglevel error -y -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -c:a copy output.mp4 exit=0 published: ffmpeg -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -c:a copy output.mp4 run: ffmpeg -hide_banner -loglevel error -y -i input-edge.mp4 -vf "ass=styled-edge.ass:fontsdir=fonts" -c:a copy output-edge.mp4 exit=0 edge: portrait 720x1280 input with no audio stream, BOM+CRLF SRT, family name with spaces, fonts folder holding 5 families published: ffmpeg -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -frames:v 1 -ss 1 test-frame.png run: ffmpeg -hide_banner -loglevel error -y -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -ss 1 -frames:v 1 test-frame.png exit=0 published: ffmpeg -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -frames:v 1 -ss 1 test-frame.png run: ffmpeg -hide_banner -loglevel error -y -i input-edge.mp4 -vf "ass=styled-edge.ass:fontsdir=fonts" -ss 1 -frames:v 1 test-frame-edge.png exit=0 edge: portrait input, BOM+CRLF SRT published: ffmpeg -loglevel verbose -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -frames:v 1 -ss 1 test-frame.png 2>&1 | grep -E "fontselect:|Glyph" run: ffmpeg -hide_banner -loglevel verbose -y -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -ss 1 -frames:v 1 -update 1 test-frame.png 2>&1 | grep -E "fontselect:|Glyph" exit=0 | [Parsed_ass_0 @ 0x559b996b2a00] fontselect: (Mukta, 400, 0) -> Mukta-Regular, 0, Mukta-Regular published: ffmpeg -loglevel verbose -i input.mp4 -vf "ass=styled.ass:fontsdir=fonts" -frames:v 1 -ss 1 test-frame.png 2>&1 | grep -E "fontselect:|Glyph" run: ffmpeg -hide_banner -loglevel verbose -y -i input.mp4 -vf "ass=styled.ass" -ss 1 -frames:v 1 -update 1 test-frame-nodir.png 2>&1 | grep -E "fontselect:|Glyph" exit=0 edge: fonts folder left out: the log shows the fallback to Noto Sans and Noto Sans Devanagari on this server | [Parsed_ass_0 @ 0x60b80f3fa240] fontselect: (Mukta, 400, 0) -> /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf, 0, NotoSans-Regular | [Parsed_ass_0 @ 0x60b80f3fa240] Glyph 0x915 not found, selecting one more font for (Mukta, 400, 0) | [Parsed_ass_0 @ 0x60b80f3fa240] fontselect: (Mukta, 400, 0) -> /usr/share/fonts/truetype/noto/NotoSansDevanagari-Regular.ttf, 0, NotoSansDevanagari-Regular published: ffmpeg -i input.mp4 -vf "subtitles=styled.ass:fontsdir=fonts" ... (control, broken conjuncts) run: ffmpeg -hide_banner -loglevel error -y -i input.mp4 -vf "subtitles=styled.ass:fontsdir=fonts" -ss 1 -frames:v 1 test-frame-subtitles-filter.png exit=0 edge: same .ass through the subtitles filter: exit 0 but conjuncts are drawn broken, see the image == streams (sound kept?) input.mp4: h264,video,1280,720,6.000000 aac,audio,6.000000 output.mp4: h264,video,1280,720,6.000000 aac,audio,6.000000 output-edge.mp4: h264,video,720,1280,4.000000 published: pip install fonttools uharfbuzz run: python3 -m venv v; v/bin/pip install fonttools uharfbuzz (clean venv, then check-font.py Mukta-Regular.ttf captions.srt) exit=0 (check-font.py exit=0) edge: clean venv, no packages beforehand; installed versions: fonttools=4.68.0 uharfbuzz=0.57.0 | Mukta: code points needed=27 missing=0 [] | words=13 glyphs=46 notdef_glyphs=0 | glyphs for 3 code points of ksha=1