Returns the total advance width for showing the specified
String
in this Font
. The advance
is the distance from the leftmost point to the rightmost point
on the string's baseline.
Note that the advance of a String
is
not necessarily the sum of the advances of its characters.
str | the String to be measured |
String
in the Font
described by this
FontMetrics
.
NullPointerException | if str is null. |
bytesWidth(byte[], int, int), charsWidth(char[], int, int), getStringBounds(String, Graphics)
Diagram: Font