| java.lang.Object | |
| ↳ | casmi.graphics.font.Font |
Font class. Wraps java.awt.Font and make it easy to use.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new Font object using default properties.
| |||||||||||
Creates a new Font object from the specified name.
| |||||||||||
Creates a new Font object from the specified name, style and point size.
| |||||||||||
Creates a new Font object from the specified name, style and point size.
| |||||||||||
Creates a new Font object from the specified font file.
| |||||||||||
Creates a new Font object from the specified font file, style and point
size.
| |||||||||||
Creates a new Font object from the specified font file, style and point
size.
| |||||||||||
Creates a new Font object from java.awt.Font object.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Get java.awt.Font object from this Font object.
| |||||||||||
Return available fonts' name of this computer.
| |||||||||||
Returns the family name of this Font.
| |||||||||||
Returns the font face name of this Font.
| |||||||||||
Returns the logical name of this Font.
| |||||||||||
Returns the postscript name of this Font.
| |||||||||||
Returns the point size of this Font in double value.
| |||||||||||
Returns the style of this Font.
| |||||||||||
Set the new point size.
| |||||||||||
Set the new style.
| |||||||||||
Set the new style from string.
| |||||||||||
Converts this Font object to a String representation.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a new Font object using default properties.
Creates a new Font object from the specified name.
| name | The font name. |
|---|
Creates a new Font object from the specified name, style and point size.
| name | The font name. |
|---|---|
| style | The font style enum by FontStyle. |
| size | The point size of the Font. |
Creates a new Font object from the specified name, style and point size.
| name | The font name. |
|---|---|
| style | The font style. |
| size | The point size of the Font. |
Creates a new Font object from the specified font file.
| file | The font file. Open Type Font(.otf) or True Type Font(.ttf) file can be used. |
|---|
| FontFormatException | If fontFormat is not TRUETYPE_FONT or TYPE1_FONT. |
|---|---|
| IOException | If the fontFile cannot be read. |
Creates a new Font object from the specified font file, style and point size.
| file | The font file. Open Type Font(.otf) or True Type Font(.ttf) file can be used. |
|---|---|
| style | The font style enum by FontStyle. |
| size | The point size of the Font. |
| FontFormatException | If fontFormat is not TRUETYPE_FONT or TYPE1_FONT. |
|---|---|
| IOException | If the fontFile cannot be read. |
Creates a new Font object from the specified font file, style and point size.
| file | The font file. Open Type Font(.otf) or True Type Font(.ttf) file can be used. |
|---|---|
| style | The font style. |
| size | The point size of the Font. |
| FontFormatException | If fontFormat is not TRUETYPE_FONT or TYPE1_FONT. |
|---|---|
| IOException | If the fontFile cannot be read. |
Creates a new Font object from java.awt.Font object.
| font | java.awt.Font object. |
|---|
Get java.awt.Font object from this Font object.
Return available fonts' name of this computer.
Returns the family name of this Font.
Returns the font face name of this Font. For example, Helvetica Bold could be returned as a font face name. Use getFamily to get the family name of the font. Use getName to get the logical name of the font.
Returns the logical name of this Font. Use getFamily to get the family name of the font. Use getFontName to get the font face name of the font.
Returns the postscript name of this Font. Use getFamily to get the family name of the font. Use getFontName to get the font face name of the font.
Returns the point size of this Font in double value.
Returns the style of this Font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
Set the new point size.
| size | The new point size of the Font. |
|---|
Set the new style.
| style | The new style of this Font. |
|---|
Set the new style from string. This method ignores case.
Example: font.setStyle("plain");
| style | The new style of this Font. |
|---|