setFontDirectory static method

Future<void> setFontDirectory(
  1. String path, [
  2. Map<String, String>? mapping = null
])

Registers the fonts inside the given path, so they become available to use in FFmpeg filters.

Note that you need to use a package with "fontconfig" inside to be able to use fonts in "FFmpeg".

Implementation

static Future<void> setFontDirectory(String path,
    [Map<String, String>? mapping = null]) async {
  try {
    await init();
    return _platform.ffmpegKitConfigSetFontDirectory(path, mapping);
  } on PlatformException catch (e, stack) {
    print("Plugin setFontDirectory error: ${e.message}");
    return Future.error("setFontDirectory failed.", stack);
  }
}