symbolExists function

bool symbolExists(
  1. String symbol
)

Whether an FSW symbol key corresponds to an existing ISWA glyph (width > 0 && height > 0). Malformed keys return false.

Mirrors the _symbol_exists helper used by Python's mirror module.

Implementation

bool symbolExists(String symbol) {
  try {
    final size = getSymbolSize(symbol);
    return size.item1 > 0 && size.item2 > 0;
  } on FormatException {
    return false;
  }
}