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

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

Introduction

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

The text is from its open source code.

Field

StringDIALOG
A String constant for the canonical family name of the logical font "Dialog".
StringSANS_SERIF
A String constant for the canonical family name of the logical font "SansSerif".
StringSERIF
A String constant for the canonical family name of the logical font "Serif".
StringMONOSPACED
A String constant for the canonical family name of the logical font "Monospaced".
intPLAIN
The plain style constant.
intBOLD
The bold style constant.
intITALIC
The italicized style constant.
intROMAN_BASELINE
The baseline used in most Roman scripts when laying out text.
intCENTER_BASELINE
The baseline used in ideographic scripts like Chinese, Japanese, and Korean when laying out text.
intHANGING_BASELINE
The baseline used in Devanagari and similar scripts when laying out text.
intTRUETYPE_FONT
Identify a font resource of type TRUETYPE.
intTYPE1_FONT
Identify a font resource of type TYPE1.

Constructor

Font(String name, int style, int size)
Creates a new Font from the specified name, style and point size.
Font(String name, int style, float sizePts)

Method

booleancanDisplay(char c)
Checks if this Font has a glyph for the specified character.
booleancanDisplay(int codePoint)
Checks if this Font has a glyph for the specified character.
intcanDisplayUpTo(String str)
Indicates whether or not this Font can display a specified String .
FontcreateFont(int fontFormat, InputStream fontStream)
Returns a new Font using the specified font type and input data.
FontcreateFont(int fontFormat, File fontFile)
Returns a new Font using the specified font type and the specified font file.
GlyphVectorcreateGlyphVector(FontRenderContext frc, String str)
Creates a java.awt.font.GlyphVector GlyphVector by mapping characters to glyphs one-to-one based on the Unicode cmap in this Font .
GlyphVectorcreateGlyphVector(FontRenderContext frc, char[] chars)
Creates a java.awt.font.GlyphVector GlyphVector by mapping characters to glyphs one-to-one based on the Unicode cmap in this Font .
GlyphVectorcreateGlyphVector(FontRenderContext frc, CharacterIterator ci)
Creates a java.awt.font.GlyphVector GlyphVector by mapping the specified characters to glyphs one-to-one based on the Unicode cmap in this Font .
GlyphVectorcreateGlyphVector(FontRenderContext frc, int[] glyphCodes)
Creates a java.awt.font.GlyphVector GlyphVector by mapping characters to glyphs one-to-one based on the Unicode cmap in this Font .
Fontdecode(String str)
Returns the Font that the str argument describes.
FontderiveFont(float size)
Creates a new Font object by replicating the current Font object and applying a new size to it.
FontderiveFont(AffineTransform trans)
Creates a new Font object by replicating the current Font object and applying a new transform to it.
FontderiveFont(int style)
Creates a new Font object by replicating the current Font object and applying a new style to it.
FontderiveFont(Map attributes)
Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it.
FontderiveFont(int style, float size)
Creates a new Font object by replicating this Font object and applying a new style and size.
FontderiveFont(int style, AffineTransform trans)
Creates a new Font object by replicating this Font object and applying a new style and transform.
booleanequals(Object obj)
Compares this Font object to the specified Object .
MapgetAttributes()
Returns a map of font attributes available in this Font .
StringgetFamily()
Returns the family name of this Font .
StringgetFamily(Locale l)
Returns the family name of this Font , localized for the specified locale.
FontgetFont(Map attributes)
Returns a Font appropriate to the attributes.
FontgetFont(String nm)
Returns a Font object from the system properties list.
StringgetFontName()
Returns the font face name of this Font .
floatgetItalicAngle()
Returns the italic angle of this Font .
LineMetricsgetLineMetrics(String str, FontRenderContext frc)
Returns a LineMetrics object created with the specified String and FontRenderContext .
StringgetName()
Returns the logical name of this Font .
intgetNumGlyphs()
Returns the number of glyphs in this Font .
StringgetPSName()
Returns the postscript name of this Font .
intgetSize()
Returns the point size of this Font , rounded to an integer.
floatgetSize2D()
Returns the point size of this Font in float value.
Rectangle2DgetStringBounds(String str, FontRenderContext frc)
Returns the logical bounds of the specified String in the specified FontRenderContext .
intgetStyle()
Returns the style of this Font .
AffineTransformgetTransform()
Returns a copy of the transform associated with this Font .
inthashCode()
Returns a hashcode for this Font .
booleanisBold()
Indicates whether or not this Font object's style is BOLD.
booleanisItalic()
Indicates whether or not this Font object's style is ITALIC.
booleanisPlain()
Indicates whether or not this Font object's style is PLAIN.
booleanisTransformed()
Indicates whether or not this Font object has a transform that affects its size in addition to the Size attribute.
GlyphVectorlayoutGlyphVector(FontRenderContext frc, char[] text, int start, int limit, int flags)
Returns a new GlyphVector object, performing full layout of the text if possible.
StringtoString()
Converts this Font object to a String representation.