# Print output for @column tags ?>
public
final
class
FontStyle
extends Object
java.lang.Object | |
↳ | android.graphics.fonts.FontStyle |
A font style object. This class represents a single font style which is a pair of weight value and slant value. Here are common font styles examples:
final FontStyle NORMAL = new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_UPRIGHT);
final FontStyle BOLD = new FontStyle(FONT_WEIGHT_BOLD, FONT_SLANT_UPRIGHT);
final FontStyle ITALIC = new FontStyle(FONT_WEIGHT_NORMAL, FONT_SLANT_ITALIC);
final FontStyle BOLD_ITALIC = new FontStyle(FONT_WEIGHT_BOLD, FONT_SLANT_ITALIC);
Constants | |
---|---|
int |
FONT_SLANT_ITALIC
A font slant value for italic |
int |
FONT_SLANT_UPRIGHT
A font slant value for upright |
int |
FONT_WEIGHT_BLACK
A font weight value for the black weight |
int |
FONT_WEIGHT_BOLD
A font weight value for the bold weight. |
int |
FONT_WEIGHT_EXTRA_BOLD
A font weight value for the extra-bold weight |
int |
FONT_WEIGHT_EXTRA_LIGHT
A font weight value for the extra-light weight |
int |
FONT_WEIGHT_LIGHT
A font weight value for the light weight |
int |
FONT_WEIGHT_MAX
A maximum weight value for the font |
int |
FONT_WEIGHT_MEDIUM
A font weight value for the medium weight |
int |
FONT_WEIGHT_MIN
A minimum weight value for the font |
int |
FONT_WEIGHT_NORMAL
A font weight value for the normal weight |
int |
FONT_WEIGHT_SEMI_BOLD
A font weight value for the semi-bold weight |
int |
FONT_WEIGHT_THIN
A font weight value for the thin weight |
Public constructors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FontStyle()
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FontStyle(int weight, int slant)
Create FontStyle with specific weight and italic
ConstantsFONT_SLANT_ITALICpublic static final int FONT_SLANT_ITALIC A font slant value for italic Constant Value: 1 (0x00000001) FONT_SLANT_UPRIGHTpublic static final int FONT_SLANT_UPRIGHT A font slant value for upright Constant Value: 0 (0x00000000) FONT_WEIGHT_BLACKpublic static final int FONT_WEIGHT_BLACK A font weight value for the black weight Constant Value: 900 (0x00000384) FONT_WEIGHT_BOLDpublic static final int FONT_WEIGHT_BOLD A font weight value for the bold weight. Constant Value: 700 (0x000002bc) FONT_WEIGHT_EXTRA_BOLDpublic static final int FONT_WEIGHT_EXTRA_BOLD A font weight value for the extra-bold weight Constant Value: 800 (0x00000320) FONT_WEIGHT_EXTRA_LIGHTpublic static final int FONT_WEIGHT_EXTRA_LIGHT A font weight value for the extra-light weight Constant Value: 200 (0x000000c8) FONT_WEIGHT_LIGHTpublic static final int FONT_WEIGHT_LIGHT A font weight value for the light weight Constant Value: 300 (0x0000012c) FONT_WEIGHT_MAXpublic static final int FONT_WEIGHT_MAX A maximum weight value for the font Constant Value: 1000 (0x000003e8) FONT_WEIGHT_MEDIUMpublic static final int FONT_WEIGHT_MEDIUM A font weight value for the medium weight Constant Value: 500 (0x000001f4) FONT_WEIGHT_MINpublic static final int FONT_WEIGHT_MIN A minimum weight value for the font Constant Value: 1 (0x00000001) FONT_WEIGHT_NORMALpublic static final int FONT_WEIGHT_NORMAL A font weight value for the normal weight Constant Value: 400 (0x00000190) FONT_WEIGHT_SEMI_BOLDpublic static final int FONT_WEIGHT_SEMI_BOLD A font weight value for the semi-bold weight Constant Value: 600 (0x00000258) FONT_WEIGHT_THINpublic static final int FONT_WEIGHT_THIN A font weight value for the thin weight Constant Value: 100 (0x00000064) Public constructorsFontStylepublic FontStyle () FontStylepublic FontStyle (int weight, int slant) Create FontStyle with specific weight and italic
See also: Public methodsequalspublic boolean equals (Object o) Indicates whether some other object is "equal to" this one.
The
The
Note that it is generally necessary to override the
getSlantpublic int getSlant () Gets the slant value
getWeightpublic int getWeight () Gets the weight value
See also: hashCodepublic int hashCode () Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
As much as is reasonably practical, the hashCode method defined by
class
toStringpublic String toString () Returns a string representation of the object. In general, the
The getClass().getName() + '@' + Integer.toHexString(hashCode())
|