deriveFont
deriveFont: ((Font, number) -> Font) & ((Font, number, number) -> Font)(Font, number) -> Font: This font at size.
(Font, number, number) -> Font: This font in style at size.
Font.new(…)
FontManager.getRunescapeFont()
FontManager.getRunescapeSmallFont()| Method | Returns | Description |
|---|---|---|
deriveFont(number) | Font | (Font, number) -> Font: This font at size. |
deriveFont(number, number) | Font | |
deriveFontStyle(number) | Font | This font in style. Luau has one number type, so a one-number deriveFont is always the size overload, and the style one is this. |
getSize() | number | The size, rounded half up. |
getSize2D() | number | The size. |
getStyle() | number | The style bits. |
isBold() | boolean | Whether the style is bold. |
isItalic() | boolean | Whether the style is italic. |
isPlain() | boolean | Whether the style is plain. |
getFamily() | string | The family the name resolved to: RuneScape, Dialog, Arial... |
getFontName() | string | The face's name, e.g. RuneScape Bold, Arial Bold, Dialog.bold. |
getName() | string | The name it was made with ("Sans-serif" stays "Sans-serif"; its family is Dialog); a name longer than 256 bytes is not kept and answe… |
equals(any) | boolean | Whether other is the same font (== answers the same, the name it was made with included; false for anything else). |
new(string, number, number) | Font | The font for name: a RuneScape family, a logical font (Font.DIALOG...), or a system family or face name; any other name is Dialog. `s… |
| Field | Type | Description |
|---|---|---|
PLAIN | number | Font.PLAIN: 0. |
BOLD | number | Font.BOLD: 1. |
ITALIC | number | Font.ITALIC: 2. |
DIALOG | string | Font.DIALOG: the logical font Swing draws with (Arial, then the fallback faces). |
DIALOG_INPUT | string | Font.DIALOG_INPUT: the logical font of text input (Courier New). |
SANS_SERIF | string | Font.SANS_SERIF: the logical sans-serif font (Arial). |
SERIF | string | Font.SERIF: the logical serif font (Times New Roman). |
MONOSPACED | string | Font.MONOSPACED: the logical monospaced font (Courier New). |
| Method | Returns | Description |
|---|---|---|
Component.getFont | Font? | The font: the component's own, else its nearest ancestor's, else nil. |
FontClass.new | Font | The font for name: a RuneScape family, a logical font (Font.DIALOG...), or a system family or face name; any other name is Dialog. `s… |
FontManagerClass.getDefaultBoldFont | Font | Swing's Dialog, bold, 16. |
FontManagerClass.getDefaultFont | Font | Swing's Dialog, plain, 16 (Font.new(Font.DIALOG, Font.PLAIN, 16)). |
FontManagerClass.getFallbackFont | Font | The family's font with Dialog's faces behind it for the characters it lacks (what FontType.getFont() answers); an unknown family is `Di… |
FontManagerClass.getRunescapeBoldFont | Font | RuneScape, bold, 16. |
FontManagerClass.getRunescapeFont | Font | RuneScape, plain, 16. |
FontManagerClass.getRunescapeSmallFont | Font | RuneScape Small, plain, 16. |
FontMetrics.getFont | Font | The font measured. |
FontType.getFont | Font | The font it describes. |
Graphics.getFont | Font | The current font. |
deriveFontderiveFont: ((Font, number) -> Font) & ((Font, number, number) -> Font)(Font, number) -> Font: This font at size.
(Font, number, number) -> Font: This font in style at size.
deriveFontStylederiveFontStyle: (Font, number) -> FontThis font in style. Luau has one number type, so a one-number deriveFont is always the size overload, and the style one is this.
getSizegetSize: (Font) -> numberThe size, rounded half up.
getSize2DgetSize2D: (Font) -> numberThe size.
getStylegetStyle: (Font) -> numberThe style bits.
isBoldisBold: (Font) -> booleanWhether the style is bold.
isItalicisItalic: (Font) -> booleanWhether the style is italic.
isPlainisPlain: (Font) -> booleanWhether the style is plain.
getFamilygetFamily: (Font) -> stringThe family the name resolved to: RuneScape, Dialog, Arial...
getFontNamegetFontName: (Font) -> stringThe face's name, e.g. RuneScape Bold, Arial Bold, Dialog.bold.
getNamegetName: (Font) -> stringThe name it was made with ("Sans-serif" stays "Sans-serif"; its family is Dialog); a name longer than 256 bytes is not kept and answers its family's name.
equalsequals: (Font, any) -> booleanWhether other is the same font (== answers the same, the name it was made with included; false for anything else).
newnew: (string, number, number) -> FontThe font for name: a RuneScape family, a logical font (Font.DIALOG...), or a system family or face name; any other name is Dialog. style is PLAIN, BOLD, ITALIC, or'ed; a face the family lacks is synthesized. Never raises.