Gets the total advance width for showing the specified substring in this
Font
. The advance width is the horizontal distance that would be occupied if the substring were to be drawn using this
Font
, including inter-character spacing following the substring necessary for proper positioning of subsequent text.
The offset
and len
parameters must specify a valid range of characters within str
. The offset
parameter must be within the range [0..(str.length())]
, inclusive. The len
parameter must be a non-negative integer such that (offset + len) <= str.length()
.
@param str the
String
to be measured
@param offset zero-based index of first character in the substring
@param len length of the substring
@return the total advance width
@throws StringIndexOutOfBoundsException if
offset
and
length
specify an invalid range
@throws NullPointerException if
str
is
null