Example usage for Java java.awt FontMetrics fields, constructors, methods, implement or subclass
The text is from its open source code.
int | bytesWidth(byte[] data, int off, int len) Returns the total advance width for showing the specified array of bytes in this Font . |
int | charsWidth(char[] data, int off, int len) Returns the total advance width for showing the specified array of characters in this Font . |
int | charWidth(int codePoint) Returns the advance width of the specified character in this Font . |
int | charWidth(char ch) Returns the advance width of the specified character in this Font . |
int | getAscent() Determines the font ascent of the Font described by this FontMetrics object. |
int | getDescent() Determines the font descent of the Font described by this FontMetrics object. |
Font | getFont() Gets the Font described by this FontMetrics object. |
FontRenderContext | getFontRenderContext() Gets the FontRenderContext used by this FontMetrics object to measure text. |
int | getHeight() Gets the standard height of a line of text in this font. |
int | getLeading() Determines the standard leading of the Font described by this FontMetrics object. |
LineMetrics | getLineMetrics(String str, Graphics context) Returns the LineMetrics object for the specified String in the specified Graphics context. |
int | getMaxAdvance() Gets the maximum advance width of any character in this Font . |
int | getMaxAscent() Determines the maximum ascent of the Font described by this FontMetrics object. |
Rectangle2D | getMaxCharBounds(Graphics context) Returns the bounds for the character with the maximum bounds in the specified Graphics context. |
int | getMaxDecent() For backward compatibility only. |
int | getMaxDescent() Determines the maximum descent of the Font described by this FontMetrics object. |
Rectangle2D | getStringBounds(String str, Graphics context) Returns the bounds of the specified String in the specified Graphics context. |
int[] | getWidths() Gets the advance widths of the first 256 characters in the Font . |
int | stringWidth(String str) Returns the total advance width for showing the specified String in this Font . |