# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Methods | Inherited Methods

# FontStyle

`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);

## Summary

### 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
Value | Name | Android Definition
--- | --- | ---
100 | Thin | `FontStyle#FONT_WEIGHT_THIN`
200 | Extra Light (Ultra Light) | `FontStyle#FONT_WEIGHT_EXTRA_LIGHT`
300 | Light | `FontStyle#FONT_WEIGHT_LIGHT`
400 | Normal (Regular) | `FontStyle#FONT_WEIGHT_NORMAL`
500 | Medium | `FontStyle#FONT_WEIGHT_MEDIUM`
600 | Semi Bold (Demi Bold) | `FontStyle#FONT_WEIGHT_SEMI_BOLD`
700 | Bold | `FontStyle#FONT_WEIGHT_BOLD`
800 | Extra Bold (Ultra Bold) | `FontStyle#FONT_WEIGHT_EXTRA_BOLD`
900 | Black (Heavy) | `FontStyle#FONT_WEIGHT_BLACK`

### Public methods
`boolean` | `equals(Object o)` Indicates whether some other object is "equal to" this one.
`int` | `getSlant()` Gets the slant value
`int` | `getWeight()` Gets the weight value
`int` | `hashCode()` Returns a hash code value for the object.
`String` | `toString()` Returns a string representation of the object.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### FONT_SLANT_ITALIC

    public static final int FONT_SLANT_ITALIC

A font slant value for italic

Constant Value: 1 (0x00000001)

### FONT_SLANT_UPRIGHT

    public static final int FONT_SLANT_UPRIGHT

A font slant value for upright

Constant Value: 0 (0x00000000)

### FONT_WEIGHT_BLACK

    public static final int FONT_WEIGHT_BLACK

A font weight value for the black weight

Constant Value: 900 (0x00000384)

### FONT_WEIGHT_BOLD

    public static final int FONT_WEIGHT_BOLD

A font weight value for the bold weight.

Constant Value: 700 (0x000002bc)

### FONT_WEIGHT_EXTRA_BOLD

    public static final int FONT_WEIGHT_EXTRA_BOLD

A font weight value for the extra-bold weight

Constant Value: 800 (0x00000320)

### FONT_WEIGHT_EXTRA_LIGHT

    public static final int FONT_WEIGHT_EXTRA_LIGHT

A font weight value for the extra-light weight

Constant Value: 200 (0x000000c8)

### FONT_WEIGHT_LIGHT

    public static final int FONT_WEIGHT_LIGHT

A font weight value for the light weight

Constant Value: 300 (0x0000012c)

### FONT_WEIGHT_MAX

    public static final int FONT_WEIGHT_MAX

A maximum weight value for the font

Constant Value: 1000 (0x000003e8)

### FONT_WEIGHT_MEDIUM

    public static final int FONT_WEIGHT_MEDIUM

A font weight value for the medium weight

Constant Value: 500 (0x000001f4)

### FONT_WEIGHT_MIN

    public static final int FONT_WEIGHT_MIN

A minimum weight value for the font

Constant Value: 1 (0x00000001)

### FONT_WEIGHT_NORMAL

    public static final int FONT_WEIGHT_NORMAL

A font weight value for the normal weight

Constant Value: 400 (0x00000190)

### FONT_WEIGHT_SEMI_BOLD

    public static final int FONT_WEIGHT_SEMI_BOLD

A font weight value for the semi-bold weight

Constant Value: 600 (0x00000258)

### FONT_WEIGHT_THIN

    public static final int FONT_WEIGHT_THIN

A font weight value for the thin weight

Constant Value: 100 (0x00000064)

## Public constructors

### FontStyle

    public FontStyle ()

### FontStyle

    public FontStyle (int weight,
                    int slant)

Create FontStyle with specific weight and italic

Value | Name | Android Definition
--- | --- | ---
100 | Thin | `FontStyle#FONT_WEIGHT_THIN`
200 | Extra Light (Ultra Light) | `FontStyle#FONT_WEIGHT_EXTRA_LIGHT`
300 | Light | `FontStyle#FONT_WEIGHT_LIGHT`
400 | Normal (Regular) | `FontStyle#FONT_WEIGHT_NORMAL`
500 | Medium | `FontStyle#FONT_WEIGHT_MEDIUM`
600 | Semi Bold (Demi Bold) | `FontStyle#FONT_WEIGHT_SEMI_BOLD`
700 | Bold | `FontStyle#FONT_WEIGHT_BOLD`
800 | Extra Bold (Ultra Bold) | `FontStyle#FONT_WEIGHT_EXTRA_BOLD`
900 | Black (Heavy) | `FontStyle#FONT_WEIGHT_BLACK`

Parameters
`weight` | `int`: a weight value
`slant` | `int`: a slant value Value is `FONT_SLANT_UPRIGHT`, or `FONT_SLANT_ITALIC`

See also:

- `FONT_WEIGHT_THIN`
- `FONT_WEIGHT_EXTRA_LIGHT`
- `FONT_WEIGHT_LIGHT`
- `FONT_WEIGHT_NORMAL`
- `FONT_WEIGHT_MEDIUM`
- `FONT_WEIGHT_SEMI_BOLD`
- `FONT_WEIGHT_BOLD`
- `FONT_WEIGHT_EXTRA_BOLD`
- `FONT_WEIGHT_BLACK`

## Public methods

### equals

    public boolean equals (Object o)

Indicates whether some other object is "equal to" this one.

The `equals` method implements an equivalence relation on non-null object references:

- It is reflexive: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is symmetric: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is transitive: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is consistent: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.

The `equals` method for class `Object` implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values `x` and `y`, this method returns `true` if and only if `x` and `y` refer to the same object (`x == y` has the value `true`).

Note that it is generally necessary to override the `hashCode` method whenever this method is overridden, so as to maintain the general contract for the `hashCode` method, which states that equal objects must have equal hash codes.

Parameters
`o` | `Object`: This value may be `null`.

Returns
`boolean` | `true` if this object is the same as the obj argument; `false` otherwise.

### getSlant

    public int getSlant ()

Gets the slant value

Returns
`int` | a slant value Value is `FONT_SLANT_UPRIGHT`, or `FONT_SLANT_ITALIC`

### getWeight

    public int getWeight ()

Gets the weight value

Returns
`int` | a weight value Value is between 0 and 1000 inclusive

See also:

- `FontStyle(int, int)`

### hashCode

    public 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 `HashMap`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `equals(Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is not required that if two objects are unequal according to the `equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

As much as is reasonably practical, the hashCode method defined by class `Object` does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the Java™ programming language.)

Returns
`int` | a hash code value for this object.

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*