JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

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

nametypedescription
Public
nameString

The name of this Font.

More: [+]

The name of this Font. It can be a logical name like 'serif' or 'sanserif' or an actual font family name like 'Helvetica' or 'Times New Roman'. If the named font cannot be found then the default font will be used. Is this correct? What is the default font? sanserif?

Note: this attribute can only be set once. Any changes after the constructor is called will be ignored.

Profile: common

This comment needs review.

sizeInteger

The point size of this Font.

More: [+]

The point size of this Font.

Note: this attribute can only be set once. Any changes after the constructor is called will be ignored.

Profile: common

This comment needs review.

styleFontStyle

The style of this Font.

More: [+]

The style of this Font. The style can be FontStyle#PLAIN, FontStyle#BOLD, FontStyle#ITALIC, or FontStyle#BOLD_ITALIC.

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 Font with the specified parameters.

More: [+]

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 Font with the specified parameters.

More: [+]

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 Font from a corresponding AWT Font.

More: [+]

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 Font object to a String representation.

More: [+]

Converts this Font object to a String representation.

Returns
String

Profile: common

Inherited Functions