# Typeface

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/graphics/Typeface#nestedclasses)\|[Constants](https://developer.android.com/reference/android/graphics/Typeface#constants)\|[Fields](https://developer.android.com/reference/android/graphics/Typeface#lfields)\|[Methods](https://developer.android.com/reference/android/graphics/Typeface#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/graphics/Typeface#inhmethods)  

# Typeface

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/graphics/Typeface "View this page in Kotlin")\|Java

`
public


class
Typeface
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|---------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.graphics.Typeface |

<br />

*** ** * ** ***

The Typeface class specifies the typeface and intrinsic style of a font. This is used in the paint, along with optionally Paint settings like textSize, textSkewX, textScaleX to specify how text appears when drawn (and measured).

## Summary

|                                                                                   ### Nested classes                                                                                    ||
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [Typeface.Builder](https://developer.android.com/reference/android/graphics/Typeface.Builder) A builder class for creating new Typeface instance.                             |
| ` class` | [Typeface.CustomFallbackBuilder](https://developer.android.com/reference/android/graphics/Typeface.CustomFallbackBuilder) A builder class for creating new Typeface instance. |

|                                               ### Constants                                                ||
|-------|-----------------------------------------------------------------------------------------------------|
| `int` | [BOLD](https://developer.android.com/reference/android/graphics/Typeface#BOLD) <br />               |
| `int` | [BOLD_ITALIC](https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC) <br /> |
| `int` | [ITALIC](https://developer.android.com/reference/android/graphics/Typeface#ITALIC) <br />           |
| `int` | [NORMAL](https://developer.android.com/reference/android/graphics/Typeface#NORMAL) <br />           |

|                                                                                                                      ### Fields                                                                                                                       ||
|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | [DEFAULT](https://developer.android.com/reference/android/graphics/Typeface#DEFAULT) The default NORMAL typeface object                         |
| ` public static final `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | [DEFAULT_BOLD](https://developer.android.com/reference/android/graphics/Typeface#DEFAULT_BOLD) The default BOLD typeface object.                |
| ` public static final `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | [MONOSPACE](https://developer.android.com/reference/android/graphics/Typeface#MONOSPACE) The NORMAL style of the default monospace typeface.    |
| ` public static final `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | [SANS_SERIF](https://developer.android.com/reference/android/graphics/Typeface#SANS_SERIF) The NORMAL style of the default sans serif typeface. |
| ` public static final `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | [SERIF](https://developer.android.com/reference/android/graphics/Typeface#SERIF) The NORMAL style of the default serif typeface.                |

|                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                             ||
|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[create](https://developer.android.com/reference/android/graphics/Typeface#create(android.graphics.Typeface,%20int,%20boolean))`(`[Typeface](https://developer.android.com/reference/android/graphics/Typeface)` family, int weight, boolean italic) ` Creates a typeface object that best matches the specified existing typeface and the specified weight and italic style Below are numerical values and corresponding common weight names. |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[create](https://developer.android.com/reference/android/graphics/Typeface#create(android.graphics.Typeface,%20int))`(`[Typeface](https://developer.android.com/reference/android/graphics/Typeface)` family, int style) ` Create a typeface object that best matches the specified existing typeface and the specified Style.                                                                                                                 |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[create](https://developer.android.com/reference/android/graphics/Typeface#create(java.lang.String,%20int))`(`[String](https://developer.android.com/reference/java/lang/String)` familyName, int style) ` Create a typeface object given a family name, and option style information.                                                                                                                                                         |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[createFromAsset](https://developer.android.com/reference/android/graphics/Typeface#createFromAsset(android.content.res.AssetManager,%20java.lang.String))`(`[AssetManager](https://developer.android.com/reference/android/content/res/AssetManager)` mgr, `[String](https://developer.android.com/reference/java/lang/String)` path) ` Create a new typeface from the specified font data.                                                   |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[createFromFile](https://developer.android.com/reference/android/graphics/Typeface#createFromFile(java.io.File))`(`[File](https://developer.android.com/reference/java/io/File)` file) ` Create a new typeface from the specified font file.                                                                                                                                                                                                   |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[createFromFile](https://developer.android.com/reference/android/graphics/Typeface#createFromFile(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` path) ` Create a new typeface from the specified font file.                                                                                                                                                                                         |
| ` static `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[defaultFromStyle](https://developer.android.com/reference/android/graphics/Typeface#defaultFromStyle(int))`(int style) ` Returns one of the default typeface objects, based on the specified style                                                                                                                                                                                                                                            |
| ` boolean`                                                                              | ` `[equals](https://developer.android.com/reference/android/graphics/Typeface#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Indicates whether some other object is "equal to" this one.                                                                                                                                                                                                    |
| ` int`                                                                                  | ` `[getStyle](https://developer.android.com/reference/android/graphics/Typeface#getStyle())`() ` Returns the typeface's intrinsic style attributes                                                                                                                                                                                                                                                                                                |
| ` final `[String](https://developer.android.com/reference/java/lang/String)             | ` `[getSystemFontFamilyName](https://developer.android.com/reference/android/graphics/Typeface#getSystemFontFamilyName())`() ` Returns the system font family name if the typeface was created from a system font family, otherwise returns null.                                                                                                                                                                                                 |
| ` int`                                                                                  | ` `[getWeight](https://developer.android.com/reference/android/graphics/Typeface#getWeight())`() ` Returns the typeface's weight value                                                                                                                                                                                                                                                                                                            |
| ` int`                                                                                  | ` `[hashCode](https://developer.android.com/reference/android/graphics/Typeface#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                                                                                                                                                                        |
| ` final boolean`                                                                        | ` `[isBold](https://developer.android.com/reference/android/graphics/Typeface#isBold())`() ` Returns true if getStyle() has the BOLD bit set.                                                                                                                                                                                                                                                                                                     |
| ` final boolean`                                                                        | ` `[isItalic](https://developer.android.com/reference/android/graphics/Typeface#isItalic())`() ` Returns true if getStyle() has the ITALIC bit set.                                                                                                                                                                                                                                                                                               |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### BOLD

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int BOLD
```

<br />

<br />

Constant Value: 1 (0x00000001)  

### BOLD_ITALIC

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int BOLD_ITALIC
```

<br />

<br />

Constant Value: 3 (0x00000003)  

### ITALIC

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ITALIC
```

<br />

<br />

Constant Value: 2 (0x00000002)  

### NORMAL

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int NORMAL
```

<br />

<br />

Constant Value: 0 (0x00000000)

## Fields

### DEFAULT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Typeface DEFAULT
```

The default NORMAL typeface object

<br />

### DEFAULT_BOLD

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Typeface DEFAULT_BOLD
```

The default BOLD typeface object. Note: this may be not actually be bold, depending on what fonts are installed. Call getStyle() to know for sure.

<br />

### MONOSPACE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Typeface MONOSPACE
```

The NORMAL style of the default monospace typeface.

<br />

### SANS_SERIF

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Typeface SANS_SERIF
```

The NORMAL style of the default sans serif typeface.

<br />

### SERIF

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Typeface SERIF
```

The NORMAL style of the default serif typeface.

<br />

## Public methods

### create

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface create (Typeface family, 
                int weight, 
                boolean italic)
```

Creates a typeface object that best matches the specified existing typeface and the specified weight and italic style

Below are numerical values and corresponding common weight names.

| Value | Common weight name |
|-------|--------------------|
| 100   | Thin               |
| 200   | Extra Light        |
| 300   | Light              |
| 400   | Normal             |
| 500   | Medium             |
| 600   | Semi Bold          |
| 700   | Bold               |
| 800   | Extra Bold         |
| 900   | Black              |

This method is thread safe.

<br />

<br />

|                                                                                      Parameters                                                                                      ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `family` | `Typeface`: An existing[Typeface](https://developer.android.com/reference/android/graphics/Typeface)object. In case of`null`, the default typeface is used instead. <br /> |
| `weight` | `int`: The desired weight to be drawn. Value is between 1 and 1000 inclusive <br />                                                                                        |
| `italic` | `boolean`:`true`if italic style is desired to be drawn. Otherwise,`false` <br />                                                                                           |

|                                                                                                                    Returns                                                                                                                    ||
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | A[Typeface](https://developer.android.com/reference/android/graphics/Typeface)object for drawing specified weight and italic style. Never returns`null` <br /> |

**See also:**

- [getWeight()](https://developer.android.com/reference/android/graphics/Typeface#getWeight())
- [isItalic()](https://developer.android.com/reference/android/graphics/Typeface#isItalic())  

### create

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface create (Typeface family, 
                int style)
```

Create a typeface object that best matches the specified existing typeface and the specified Style. Use this call if you want to pick a new style from the same family of an existing typeface object. If family is null, this selects from the default font's family.

This method is not thread safe on API 27 or before. This method is thread safe on API 28 or after.

<br />

<br />

|                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                   ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `family` | `Typeface`: An existing[Typeface](https://developer.android.com/reference/android/graphics/Typeface)object. In case of`null`, the default typeface is used instead. <br />                                                                                                                                                                                                                                                                                          |
| `style`  | `int`: The style (normal, bold, italic) of the typeface. e.g. NORMAL, BOLD, ITALIC, BOLD_ITALIC Value is[NORMAL](https://developer.android.com/reference/android/graphics/Typeface#NORMAL),[BOLD](https://developer.android.com/reference/android/graphics/Typeface#BOLD),[ITALIC](https://developer.android.com/reference/android/graphics/Typeface#ITALIC), or[BOLD_ITALIC](https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC) <br /> |

|                                                      Returns                                                      ||
|-------------------------------------------------------------------------------|------------------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | The best matching typeface. <br /> |

### create

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface create (String familyName, 
                int style)
```

Create a typeface object given a family name, and option style information. If null is passed for the name, then the "default" font will be chosen. The resulting typeface object can be queried (getStyle()) to discover what its "real" style characteristics are.

<br />

|                                                                                                                                                                                                                                    Parameters                                                                                                                                                                                                                                     ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `familyName` | `String`: May be null. The name of the font family. <br />                                                                                                                                                                                                                                                                                                                                                                                                          |
| `style`      | `int`: The style (normal, bold, italic) of the typeface. e.g. NORMAL, BOLD, ITALIC, BOLD_ITALIC Value is[NORMAL](https://developer.android.com/reference/android/graphics/Typeface#NORMAL),[BOLD](https://developer.android.com/reference/android/graphics/Typeface#BOLD),[ITALIC](https://developer.android.com/reference/android/graphics/Typeface#ITALIC), or[BOLD_ITALIC](https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC) <br /> |

|                                                      Returns                                                      ||
|-------------------------------------------------------------------------------|------------------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | The best matching typeface. <br /> |

### createFromAsset

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface createFromAsset (AssetManager mgr, 
                String path)
```

Create a new typeface from the specified font data.

<br />

|                                   Parameters                                    ||
|--------|-------------------------------------------------------------------------|
| `mgr`  | `AssetManager`: The application's asset manager <br />                  |
| `path` | `String`: The file name of the font data in the assets directory <br /> |

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------|--------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | The new typeface. <br /> |

### createFromFile

Added in[API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface createFromFile (File file)
```

Create a new typeface from the specified font file.

<br />

|                                 Parameters                                 ||
|--------|--------------------------------------------------------------------|
| `file` | `File`: The path to the font data. This value may be`null`. <br /> |

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------|--------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | The new typeface. <br /> |

### createFromFile

Added in[API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface createFromFile (String path)
```

Create a new typeface from the specified font file.

<br />

|                                    Parameters                                     ||
|--------|---------------------------------------------------------------------------|
| `path` | `String`: The full path to the font data. This value may be`null`. <br /> |

|                                                 Returns                                                 ||
|-------------------------------------------------------------------------------|--------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | The new typeface. <br /> |

### defaultFromStyle

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static Typeface defaultFromStyle (int style)
```

Returns one of the default typeface objects, based on the specified style

<br />

|                                                                                                                                                                                     Parameters                                                                                                                                                                                      ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `style` | `int`: Value is[NORMAL](https://developer.android.com/reference/android/graphics/Typeface#NORMAL),[BOLD](https://developer.android.com/reference/android/graphics/Typeface#BOLD),[ITALIC](https://developer.android.com/reference/android/graphics/Typeface#ITALIC), or[BOLD_ITALIC](https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC) <br /> |

|                                                                 Returns                                                                  ||
|-------------------------------------------------------------------------------|-----------------------------------------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | the default typeface that corresponds to the style <br /> |

### equals

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

An equivalence relation partitions the elements it operates on into*equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

|                            Parameters                             ||
|-----|--------------------------------------------------------------|
| `o` | `Object`: the reference object with which to compare. <br /> |

|                                         Returns                                          ||
|-----------|-------------------------------------------------------------------------------|
| `boolean` | `true`if this object is the same as the obj argument;`false`otherwise. <br /> |

### getStyle

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getStyle ()
```

Returns the typeface's intrinsic style attributes

<br />

|                                                                                                                                                                                  Returns                                                                                                                                                                                   ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[NORMAL](https://developer.android.com/reference/android/graphics/Typeface#NORMAL),[BOLD](https://developer.android.com/reference/android/graphics/Typeface#BOLD),[ITALIC](https://developer.android.com/reference/android/graphics/Typeface#ITALIC), or[BOLD_ITALIC](https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC) <br /> |

### getSystemFontFamilyName

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final String getSystemFontFamilyName ()
```

Returns the system font family name if the typeface was created from a system font family, otherwise returns null.

<br />

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### getWeight

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getWeight ()
```

Returns the typeface's weight value

<br />

|                       Returns                       ||
|-------|----------------------------------------------|
| `int` | Value is between 0 and 1000 inclusive <br /> |

### hashCode

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
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](https://developer.android.com/reference/java/util/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](https://developer.android.com/reference/java/lang/Object#equals(java.lang.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](https://developer.android.com/reference/java/lang/Object#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.

<br />

<br />

|                     Returns                      ||
|-------|-------------------------------------------|
| `int` | a hash code value for this object. <br /> |

### isBold

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final boolean isBold ()
```

Returns true if getStyle() has the BOLD bit set.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isItalic

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final boolean isItalic ()
```

Returns true if getStyle() has the ITALIC bit set.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |