Overview
The Font
class represents fonts, which are used to
render text on screen. A Font
includes the name of the
font (such as 'Helvetica' or 'Arial'), the style of
the font (bold, plain or italic), and the size of the font
in points (10pt, 12pt, etc.)
A font provides the information needed to map sequences of characters to sequences of glyphs and to render sequences of glyphs on screen.
Profile: common
This comment needs review.
Attribute Summary
name | type | description |
---|---|---|
Public | ||
name | String |
The name of this The name of this Note: this attribute can only be set once. Any changes after the constructor is called will be ignored. Profile: common This comment needs review. |
size | Integer |
The point size of this The point size of this Note: this attribute can only be set once. Any changes after the constructor is called will be ignored. Profile: common This comment needs review. |
style | FontStyle |
The style of this The style of this Note: this attribute can only be set once. Any changes after the constructor is called will be ignored. Profile: common This comment needs review. |
Protected |
Inherited Attributes
Function Summary
- public static font(name: java.lang.String, style: FontStyle, size: Integer) : Font
-
Creates a new
More: [+]Font
with the specified parameters.Creates a new
Font
with the specified parameters.-
Parameters
- name
-
the logical name for the new
Font
. - style
-
the style for the new
Font
- size
-
the size for the new
Font
-
Returns
- Font
Profile: common
- public static font(name: java.lang.String, style: FontStyle, size: Integer, url: java.lang.String) : Font
-
Creates new
More: [+]Font
with the specified parameters.Creates new
Font
with the specified parameters. In the case a font cannot be loaded from given URL, the function returns a font derived from a font existing in the system based on name,style and size parameters.-
Parameters
- name
-
the logical name for the new
Font
. Can be null - style
-
the style for the new
Font
. Can be null, in this case default style will be used for creating the font. - size
-
the size for the new
Font
- url
- url string from where the font is loaded
-
Returns
- Font
- public static fromAWTFont(f: java.awt.Font) : Font
-
Creates a new
More: [+]Font
from a corresponding AWT Font.Creates a new
Font
from a corresponding AWT Font.This comment needs review.
-
Parameters
- f
-
Returns
- Font
- public getAWTFont() : java.awt.Font
-
More: [+]
-
Returns
- Font
- public toString() : java.lang.String
-
Converts this
More: [+]Font
object to aString
representation.Converts this
Font
object to aString
representation.-
Returns
- String
Profile: common