[FFmpeg-trac] #9745(ffmpeg:new): [drawtext filter]fontconfig doesn't work well
FFmpeg
trac at avcodec.org
Sun Apr 24 11:41:22 EEST 2022
#9745: [drawtext filter]fontconfig doesn't work well
-------------------------------------+-------------------------------------
Reporter: Hellena | Type: defect
Status: new | Priority: important
Component: ffmpeg | Version: git-
Keywords: | master
drawtext,fontconfig,font-style | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
I want to use some style for drawtext filter, such as
bold/italis/underline/strikeline.
In the document of ffmpeg filter, there's the example:
{{{
Use fontconfig to set the font. Note that the colons need to be escaped.
drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
}}}
I try this code, but it only work when I use a few value, ex:style=bold.
{{{
ffmpeg -loglevel debug -i "mul/bg1.png" \
-filter_complex "[0]drawtext=x=50:y=60:\
fontfile='YuantiSC\\:style=underline\\:size=140\\:spacing=20':\
text=FFmpeg" \
-c:a aac -r 25 -s 720:1280 -c:v libx264 \
-pix_fmt yuv420p \
-y test_blod_cut5.mp4
}}}
The version I have checked in my computer is:
ffmpeg 5.0.1,fonconfig 2.14.0
Any problem in the code?
And how can I accomplish the requirment of underline/strikeline and so on.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9745>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list