public interface AQFont
java.awt.Font
.
An instance of this interface can be obtained via one of the newFont() methods in AQFontFactory
,
Example:
var fontFactory = aqua.type.font;
var arial = fontFactory.newFont("Arial", fontFactory.BOLD, 12);
var helvetica = fontFactory.newFont("Helvetica");
Modifier and Type | Field and Description |
---|---|
static int |
BOLD
The bold style constant.
|
static int |
ITALIC
The italicized style constant.
|
static int |
PLAIN
The plain style constant.
|
Modifier and Type | Method and Description |
---|---|
AQFont |
deriveFont(int style,
float size)
Creates a new AQFont object by replicating this AQFont object and applying a new style and size.
|
AQFont |
deriveFontBySize(float size)
Creates a new AQFont object by replicating this AQFont object and applying a new size to it.
|
AQFont |
deriveFontByStyle(int style)
Creates a new AQFont object by replicating this AQFont object and applying a new style to it.
|
java.lang.String |
getFamily()
Returns the family name of this AQFont.
|
java.lang.String |
getFontName()
Returns the font face name of this AQFont.
|
java.awt.Font |
getJavaFont()
Returns the underlying
java.awt.Font object. |
java.lang.String |
getName()
Returns the logical name of this AQFont.
|
int |
getSize()
Returns the point size of this AQFont, rounded to an integer.
|
int |
getStyle()
Returns the style of this AQFont.
|
boolean |
isBold()
Indicates whether or not this AQFont object's style is BOLD.
|
boolean |
isItalic()
Indicates whether or not this AQFont object's style is ITALIC.
|
boolean |
isPlain()
Indicates whether or not this AQFont object's style is PLAIN.
|
static final int BOLD
static final int ITALIC
static final int PLAIN
AQFont deriveFont(int style, float size)
style
- the style for the new AQFontsize
- the size for the new AQFontAQFont deriveFontBySize(float size)
size
- the size for the new AQFontAQFont deriveFontByStyle(int style)
style
- the style for the new AQFontjava.lang.String getFamily()
The family name of a font is font specific. Two fonts such as Helvetica Italic and Helvetica Bold have the same family name, Helvetica, whereas their font face names are Helvetica Bold and Helvetica Italic.
Use getName()
to get the logical name of the font. Use getFontName()
to get the font face name of the font.
java.lang.String getName()
Use getFamily()
to get the family name of the font. Use getFontName()
to get the font face name of the font.
java.lang.String getFontName()
Use getFamily()
to get the family name of the font. Use getName()
to get the logical name of the font.
int getSize()
int getStyle()
java.awt.Font getJavaFont()
java.awt.Font
object.boolean isBold()
boolean isItalic()
boolean isPlain()
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.