textPainter static method
Implementation
static TextPainter textPainter(UDocShape shape, UDocShapeGeometry geometry, double maxWidth) => TextPainter(
text: TextSpan(
text: shape.text,
style: TextStyle(
color: shape.strokeColor,
fontSize: max(6, geometry.lengthToPixels(shape.fontSize)),
fontWeight: shape.bold ? FontWeight.w700 : FontWeight.w400,
fontFamily: "Vazir",
package: "u",
height: 1.35,
),
),
textDirection: UDocText.isRtl(shape.text) ? TextDirection.rtl : TextDirection.ltr,
)..layout(minWidth: max(0, maxWidth), maxWidth: max(20, maxWidth));