fontOutlines function

FontOutlines fontOutlines(
  1. ByteData bytes
)

The outline format of bytes: glyf, CFF, or CFF2.

Implementation

FontOutlines fontOutlines(ByteData bytes) {
  final records = fontTableRecords(bytes);
  if (records == null) return FontOutlines.none;
  if (records.containsKey('glyf')) return FontOutlines.trueType;
  if (records.containsKey('CFF2')) return FontOutlines.cff2;
  if (records.containsKey('CFF ')) return FontOutlines.cff;
  return FontOutlines.none;
}