Measures one atomic layout piece - a word, a single space, or an image span - under whatever
style it carries. A canvas backend measures with TextMetrics; a fixed-width test double can
measure with a plain character count. piece.image is set instead of piece.text for an image
span, so a measurer can give it the icon's own width rather than treating it as zero-width text.
Measures one atomic layout piece - a word, a single space, or an image span - under whatever style it carries. A canvas backend measures with
TextMetrics; a fixed-width test double can measure with a plain character count.piece.imageis set instead ofpiece.textfor an image span, so a measurer can give it the icon's own width rather than treating it as zero-width text.