Java java.awt FontMetrics fields, constructors, methods, implement or subclass

Example usage for Java java.awt FontMetrics fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt FontMetrics.

The text is from its open source code.

Method

intbytesWidth(byte[] data, int off, int len)
Returns the total advance width for showing the specified array of bytes in this Font .
intcharsWidth(char[] data, int off, int len)
Returns the total advance width for showing the specified array of characters in this Font .
intcharWidth(int codePoint)
Returns the advance width of the specified character in this Font .
intcharWidth(char ch)
Returns the advance width of the specified character in this Font .
intgetAscent()
Determines the font ascent of the Font described by this FontMetrics object.
intgetDescent()
Determines the font descent of the Font described by this FontMetrics object.
FontgetFont()
Gets the Font described by this FontMetrics object.
FontRenderContextgetFontRenderContext()
Gets the FontRenderContext used by this FontMetrics object to measure text.
intgetHeight()
Gets the standard height of a line of text in this font.
intgetLeading()
Determines the standard leading of the Font described by this FontMetrics object.
LineMetricsgetLineMetrics(String str, Graphics context)
Returns the LineMetrics object for the specified String in the specified Graphics context.
intgetMaxAdvance()
Gets the maximum advance width of any character in this Font .
intgetMaxAscent()
Determines the maximum ascent of the Font described by this FontMetrics object.
Rectangle2DgetMaxCharBounds(Graphics context)
Returns the bounds for the character with the maximum bounds in the specified Graphics context.
intgetMaxDecent()
For backward compatibility only.
intgetMaxDescent()
Determines the maximum descent of the Font described by this FontMetrics object.
Rectangle2DgetStringBounds(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 .
intstringWidth(String str)
Returns the total advance width for showing the specified String in this Font .