Wait until this asset is fully loaded, then return it for chaining. An in-memory asset returns at once; one still loading (a file read or remote fetch) yields the coroutine until it lands. A load failure raises; format errors on playable assets still surface at use time.
Font:metrics
method
Font:metrics(size: number | string) -> font.Metrics
Vertical metrics of this face at size — a number (px) or a unit string like "1.5rem"/"50vw" — as text set in it is laid out. Use them to align text baselines with other drawing, or to size rows before laying text out.
Example
-- A size in px, or with a unit; the metrics come back in px.local m = face:metrics(20)
print(m.ascent, m.descent, m.line_height) --> 22.0 5.0 24.0local large = face:metrics("2rem")
print(large.line_height) --> 48.0