shape method

TextShapeResult shape(
  1. String text,
  2. List<TextRun> runs, {
  3. TextDirection? direction,
})

Implementation

TextShapeResult shape(
  String text,
  List<TextRun> runs, {
  TextDirection? direction,
}) {
  if (_fallbackFontsEnabled != _fallbackFontsActuallyEnabled) {
    if (_fallbackFontsEnabled) {
      enableFallbackFonts();
    } else {
      disableFallbackFonts();
    }
    _fallbackFontsActuallyEnabled = _fallbackFontsEnabled;
  }
  return computeShape(
    text.runes.toList(),
    runs,
    direction: direction,
  );
}