magickQueryFonts function

List<String>? magickQueryFonts(
  1. String pattern
)

Returns any font that match the specified pattern (e.g. "*" for all).

Implementation

List<String>? magickQueryFonts(String pattern) => using((Arena arena) {
      final Pointer<Char> patternPtr =
          pattern.toNativeUtf8(allocator: arena).cast();
      final Pointer<Size> numFontsPtr = arena();
      final Pointer<Pointer<Char>> resultPtr =
          _magickWandBindings.MagickQueryFonts(patternPtr, numFontsPtr);
      int numFonts = numFontsPtr.value;
      final List<String>? result = resultPtr.toStringList(numFonts);
      _magickRelinquishMemory(resultPtr.cast());
      return result;
    });