drawGetTypeMetrics method
DrawGetTypeMetrics() returns the following information for the specified font and text:
- character width
- character height
- ascender
- descender
- text width
- text height
- maximum horizontal advance
- bounds: x1
- bounds: y1
- bounds: x2
- bounds: y2
- origin: x
- origin: y
- underline position
- underline thickness
This method runs in a different isolate than the main isolate.
Parameters to this method are:
- text: text to draw.
- ignoreNewlines: indicates whether newlines should be ignored.
Implementation
Future<TypeMetric?> drawGetTypeMetrics({
required String text,
required bool ignoreNewlines,
}) async =>
await _magickCompute(
_drawGetTypeMetrics,
_DrawGetTypeMetricsParams(
_wandPtr.address,
text,
ignoreNewlines,
),
);