tanersener / react-native-ffmpeg

FFmpeg for react-native. Not maintained anymore. Superseded by FFmpegKit.
GNU General Public License v3.0
400 stars 51 forks source link

Render Strange Font #176

Closed juraam closed 4 years ago

juraam commented 4 years ago

Description Hello, first of all, thank you so much for this perfect library. I think it is the best cross platform library for videoediting. I use ffmpeg library for rendering texts on video . When app launches it setup font directory RNFFmpegConfig.setFontDirectory(dirs.MainBundleDir);. MainBundleDir contains all fonts of application. It contains Montserrat-Medium.ttf, Montserrat-Regular.ttf and other. I use drawtext with params font=Montserrat-Medium, but it renders video with font Montserrat-Regular, not Montserrat-Medium. So in log I see Using "/private/var/containers/Bundle/Application/4AF4651C-7DEE-459D-A166-08733D149C64/Mooov.app/Montserrat-Regular.ttf" Why does it use Montserrat-Regular, if in the same folder there is Montserrat-Medium.ttf file ?

juraam commented 4 years ago

When I use drawtext with fontfile parameter with full path to ttf is works okay for iOS. But for Android It doesn't work. When I used fontfile=/data/user/0/app.mooov/Montserrat-Bold.ttf in parameters I saw in log: Using "/data/user/0/app.mooov/files/Montserrat-Medium.ttf" Why does it happen ?