public int getWidth ( String whatchars ) { int totalwidth = 0 ; IntObject intObject = null ; int currentChar = 0 ; for ( int i = 0 ; i < whatchars . length ( ) ; i ++ ) { currentChar = whatchars . charAt ( i ) ; if ( currentChar < 256 ) { intObject = charArray [ currentChar ] ; } else { intObject = ( IntObject ) customChars . get ( new Character ( ( char ) currentChar ) ) ; } if ( intObject != null ) totalwidth += intObject . width ; } return totalwidth ; }
Get the width of a given String