SwingTerminalFontConfiguration
public class AWTTerminalFontConfiguration extends Object
AWTTerminal
. By customizing this class, you can
choose which fonts are going to be used by an AWTTerminal
component and some other related settings.Modifier and Type | Class | Description |
---|---|---|
static class |
AWTTerminalFontConfiguration.BoldMode |
Controls how the SGR bold will take effect when enabled on a character.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_FONT_SIZE |
The default font size used unless overridden
|
Modifier | Constructor | Description |
---|---|---|
protected |
AWTTerminalFontConfiguration(boolean useAntiAliasing,
AWTTerminalFontConfiguration.BoldMode boldMode,
Font... fontsInOrderOfPriority) |
Modifier and Type | Method | Description |
---|---|---|
static Font[] |
filterMonospaced(Font... fonts) |
Given an array of fonts, returns another array with only the ones that are monospaced.
|
static AWTTerminalFontConfiguration |
getDefault() |
This is the default font settings that will be used if you don't specify anything
|
static AWTTerminalFontConfiguration |
getDefaultOfSize(int fontSize) |
Returns the default font settings except for a custom font size to use.
|
int |
getFontHeight() |
Returns the vertical size in pixels of the fonts configured
|
int |
getFontWidth() |
Returns the horizontal size in pixels of the fonts configured
|
boolean |
isAntiAliased() |
Returns
true if anti-aliasing has been enabled, false otherwise |
static AWTTerminalFontConfiguration |
newInstance(Font... fontsInOrderOfPriority) |
Creates a new font configuration from a list of fonts in order of priority.
|
protected static Font[] |
selectDefaultFont() |
Returns the default font to use depending on the platform
|
protected static Font[] |
selectDefaultFont(int fontSize) |
Returns the default font to use depending on the platform
|
public static final int DEFAULT_FONT_SIZE
protected AWTTerminalFontConfiguration(boolean useAntiAliasing, AWTTerminalFontConfiguration.BoldMode boldMode, Font... fontsInOrderOfPriority)
protected static Font[] selectDefaultFont()
protected static Font[] selectDefaultFont(int fontSize)
fontSize
- The size of the fonts to usepublic static AWTTerminalFontConfiguration getDefault()
AWTTerminal
font configuration object with default values set uppublic static AWTTerminalFontConfiguration getDefaultOfSize(int fontSize)
fontSize
- Size of the fontAWTTerminal
font configuration object with default values set uppublic static Font[] filterMonospaced(Font... fonts)
fonts
- Fonts to filter monospaced fonts frompublic static AWTTerminalFontConfiguration newInstance(Font... fontsInOrderOfPriority)
fontsInOrderOfPriority
- Fonts to use when drawing text, in order of prioritypublic int getFontWidth()
public int getFontHeight()
public boolean isAntiAliased()
true
if anti-aliasing has been enabled, false
otherwisetrue
if anti-aliasing has been enabled, false
otherwiseCopyright © 2020. All rights reserved.