# FontFamily

# FontFamily

Artifact:[androidx.glance:glance](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/text/FontFamily.kt+class:androidx.glance.text.FontFamily)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

<br />

```
class FontFamily
```

<br />

*** ** * ** ***

Describes the family of the font. Defaults are provided, but it is also possible to supply a custom family. If this is found on the system it will be used, otherwise it will fallback to a system default.

## Summary

|                               ### Public companion properties                                |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [FontFamily](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily) | [Cursive](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#Cursive()) Cursive, hand-written like font family.                     |
| [FontFamily](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily) | [Monospace](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#Monospace()) Font family where glyphs have the same fixed width.     |
| [FontFamily](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily) | [SansSerif](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#SansSerif()) Font family with low contrast and plain stroke endings. |
| [FontFamily](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily) | [Serif](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#Serif()) The formal text style for scripts.                              |

|                                                                                                ### Public constructors                                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [FontFamily](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#FontFamily(kotlin.String))`(family: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |

|                                   ### Public functions                                   |
|------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#toString())`()` |

|                               ### Public properties                               |
|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [family](https://developer.android.com/reference/kotlin/androidx/glance/text/FontFamily#family()) |

## Public companion properties

### Cursive

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Cursive: FontFamily
```

Cursive, hand-written like font family.  

### Monospace

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Monospace: FontFamily
```

Font family where glyphs have the same fixed width.  

### SansSerif

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val SansSerif: FontFamily
```

Font family with low contrast and plain stroke endings.  

### Serif

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Serif: FontFamily
```

The formal text style for scripts.  

## Public constructors

### FontFamily

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
FontFamily(family: String)
```  

## Public functions

### toString

```
open fun toString(): String
```  

## Public properties

### family

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val family: String
```