How to get the number of chars represented by a GlyphVector?
I am trying to get the number of chars that a GlyphVector represents The
following line seems to work:
The problem is that reading the documentation for getGlyphCharIndex(int
glyphIndex) gives me the feeling that the method should throw an
IndexOutOfBounds exception if the value of glyphIndex equals the number
of glyphs (just like you get an exception when calling
myArray[myArray.length]). But on the other hand it does not explicitly
say that any parameter greater or equal to the number of glyphs will
throw an exception. Can I reliably use the method to determine the
number of chars in a glyph vector or is there a chance that my code will
not work on other VMs or future versions? Maybe the documentation should
be updated to clarify the behaviour? Or is there even a better day to
get the number of chars represented by a glyphVector?
To unsubscribe, send email to firstname.lastname@example.org and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
email@example.com and include in the body of the message "help".