my $hang_width = $text_object->advancewidth($arg{'-hang'}); #### $width = $txt->advancewidth $string [, %textstate] Returns the width of the string based on all currently set text-attributes or on those overridden by %textstate.