Some Tibetan characters aren't rendered correctly with drawtext filter.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Some Tibetan characters aren't rendered correctly with drawtext filter.

张一环
I'm trying to use ffmpeg drawtext filter to render Tibetan text to videos. But some characters aren't rendered correctly.

for example:

སྤྱི་སྟེགས

Expected render output:
https://i.stack.imgur.com/TJnQE.png

Actual render output:
https://i.stack.imgur.com/qtOlG.png

Here's my ffmpeg command line:
ffmpeg -i input.mp4 -filter_complex "drawtext=fontsize=80:fontcolor=black:fontfile=himalaya.ttf:shadowx=1:shadowy=1:text='སྤྱི་སྟེགས':x=0:y=0" -c:v libx264 -b:v 400k -c:a copy output.mp4

The font himalaya.ttf (Microsoft Himalaya) is the default built-in font for Tibetan on Windows. (See https://docs.microsoft.com/en-us/typography/font-list/microsoft-himalaya )

I tried many other Tibetan fonts, and many ffmpeg versions, problem exists anyway.

All of those fonts are rendered correctly in other places such as a web browser.

I asked a question on stackoverflow (Link: https://stackoverflow.com/questions/62458321/ffmpeg-drawtext-support-for-tibetan-fonts ),
and now I know this unlikely freetype fault, I tired using harfbuzz as shaping engine, to render Tibetan in an ass subtitle, it works correctly.

But the problem is, ffmpeg drawtext filter does not support to specify a shaping engine (use harfbuzz rather than fribidi).

So this is a bug? Thank you.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".