Example usage for Java java.awt Font fields, constructors, methods, implement or subclass
The text is from its open source code.
String | DIALOG A String constant for the canonical family name of the logical font "Dialog". |
String | SANS_SERIF A String constant for the canonical family name of the logical font "SansSerif". |
String | SERIF A String constant for the canonical family name of the logical font "Serif". |
String | MONOSPACED A String constant for the canonical family name of the logical font "Monospaced". |
int | PLAIN The plain style constant. |
int | BOLD The bold style constant. |
int | ITALIC The italicized style constant. |
int | ROMAN_BASELINE The baseline used in most Roman scripts when laying out text. |
int | CENTER_BASELINE The baseline used in ideographic scripts like Chinese, Japanese, and Korean when laying out text. |
int | HANGING_BASELINE The baseline used in Devanagari and similar scripts when laying out text. |
int | TRUETYPE_FONT Identify a font resource of type TRUETYPE. |
int | TYPE1_FONT Identify a font resource of type TYPE1. |
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) |
boolean | canDisplay(char c) Checks if this Font has a glyph for the specified character. |
boolean | canDisplay(int codePoint) Checks if this Font has a glyph for the specified character. |
int | canDisplayUpTo(String str) Indicates whether or not this Font can display a specified String . |
Font | createFont(int fontFormat, InputStream fontStream) Returns a new Font using the specified font type and input data. |
Font | createFont(int fontFormat, File fontFile) Returns a new Font using the specified font type and the specified font file. |
GlyphVector | createGlyphVector(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 . |
GlyphVector | createGlyphVector(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 . |
GlyphVector | createGlyphVector(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 . |
GlyphVector | createGlyphVector(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 . |
Font | decode(String str) Returns the Font that the str argument describes. |
Font | deriveFont(float size) Creates a new Font object by replicating the current Font object and applying a new size to it. |
Font | deriveFont(AffineTransform trans) Creates a new Font object by replicating the current Font object and applying a new transform to it. |
Font | deriveFont(int style) Creates a new Font object by replicating the current Font object and applying a new style to it. |
Font | deriveFont(Map extends Attribute, ?> attributes) Creates a new Font object by replicating the current Font object and applying a new set of font attributes to it. |
Font | deriveFont(int style, float size) Creates a new Font object by replicating this Font object and applying a new style and size. |
Font | deriveFont(int style, AffineTransform trans) Creates a new Font object by replicating this Font object and applying a new style and transform. |
boolean | equals(Object obj) Compares this Font object to the specified Object . |
Map | getAttributes() Returns a map of font attributes available in this Font . |
String | getFamily() Returns the family name of this Font . |
String | getFamily(Locale l) Returns the family name of this Font , localized for the specified locale. |
Font | getFont(Map extends Attribute, ?> attributes) Returns a Font appropriate to the attributes. |
Font | getFont(String nm) Returns a Font object from the system properties list. |
String | getFontName() Returns the font face name of this Font . |
float | getItalicAngle() Returns the italic angle of this Font . |
LineMetrics | getLineMetrics(String str, FontRenderContext frc) Returns a LineMetrics object created with the specified String and FontRenderContext . |
String | getName() Returns the logical name of this Font . |
int | getNumGlyphs() Returns the number of glyphs in this Font . |
String | getPSName() Returns the postscript name of this Font . |
int | getSize() Returns the point size of this Font , rounded to an integer. |
float | getSize2D() Returns the point size of this Font in float value. |
Rectangle2D | getStringBounds(String str, FontRenderContext frc) Returns the logical bounds of the specified String in the specified FontRenderContext . |
int | getStyle() Returns the style of this Font . |
AffineTransform | getTransform() Returns a copy of the transform associated with this Font . |
int | hashCode() Returns a hashcode for this Font . |
boolean | isBold() Indicates whether or not this Font object's style is BOLD. |
boolean | isItalic() Indicates whether or not this Font object's style is ITALIC. |
boolean | isPlain() Indicates whether or not this Font object's style is PLAIN. |
boolean | isTransformed() Indicates whether or not this Font object has a transform that affects its size in addition to the Size attribute. |
GlyphVector | layoutGlyphVector(FontRenderContext frc, char[] text, int start, int limit, int flags) Returns a new GlyphVector object, performing full layout of the text if possible. |
String | toString() Converts this Font object to a String representation. |