1 package com
.googlecode
.lanterna
.terminal
.swing
;
6 * Font configuration class for {@link SwingTerminal} that is extending from {@link AWTTerminalFontConfiguration}
8 public class SwingTerminalFontConfiguration
extends AWTTerminalFontConfiguration
{
10 * This is the default font settings that will be used if you don't specify anything
12 public static SwingTerminalFontConfiguration
getDefault() {
13 return newInstance(filterMonospaced(selectDefaultFont()));
17 * Creates a new font configuration from a list of fonts in order of priority. This works by having the terminal
18 * attempt to draw each character with the fonts in the order they are specified in and stop once we find a font
19 * that can actually draw the character. For ASCII characters, it's very likely that the first font will always be
21 * @param fontsInOrderOfPriority Fonts to use when drawing text, in order of priority
22 * @return Font configuration built from the font list
24 @SuppressWarnings("WeakerAccess")
25 public static SwingTerminalFontConfiguration
newInstance(Font
... fontsInOrderOfPriority
) {
26 return new SwingTerminalFontConfiguration(true, BoldMode
.EVERYTHING_BUT_SYMBOLS
, fontsInOrderOfPriority
);
30 * Creates a new font configuration from a list of fonts in order of priority. This works by having the terminal
31 * attempt to draw each character with the fonts in the order they are specified in and stop once we find a font
32 * that can actually draw the character. For ASCII characters, it's very likely that the first font will always be
34 * @param useAntiAliasing If {@code true} then anti-aliasing should be enabled when drawing text
35 * @param boldMode Option to control what to do when drawing text with the bold SGR enabled
36 * @param fontsInOrderOfPriority Fonts to use when drawing text, in order of priority
38 public SwingTerminalFontConfiguration(boolean useAntiAliasing
, BoldMode boldMode
, Font
... fontsInOrderOfPriority
) {
39 super(useAntiAliasing
, boldMode
, fontsInOrderOfPriority
);