# FontListFontFamily

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/font/FontFamily.kt+class:androidx.compose.ui.text.font.FontListFontFamily) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class FontListFontFamily : FileBasedFontFamily, List<Font>
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.compose.ui.text.font.FontFamily](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily) |||
|   | ↳ | [androidx.compose.ui.text.font.FileBasedFontFamily](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FileBasedFontFamily) ||
|   |   | ↳ | [androidx.compose.ui.text.font.FontListFontFamily](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontListFontFamily) |

*** ** * ** ***

Defines a font family with list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font`.

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily

Text(text = "Demo Text sans-serif", fontFamily = FontFamily.SansSerif)
```

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight

val fontFamily =
    FontFamily(
        Font(
            resId = R.font.my_font_400_regular,
            weight = FontWeight.W400,
            style = FontStyle.Normal,
        ),
        Font(
            resId = R.font.my_font_400_italic,
            weight = FontWeight.W400,
            style = FontStyle.Italic,
        ),
    )
Text(text = "Demo Text", fontFamily = fontFamily)
```

## Summary

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontListFontFamily#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontListFontFamily#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontListFontFamily#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontListFontFamily#fonts()` The fallback list of fonts used for resolving typefaces for this FontFamily. | Cmn |

### Inherited functions

From [kotlin.collections.List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html) `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/contains.html(element: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font)` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/contains-all.html(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>)` Cmn `open operator https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get.html(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index-of.html(element: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font)` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/is-empty.html()` Cmn `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/iterator.html()` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/last-index-of.html(element: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font)` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/list-iterator.html()` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/list-iterator.html(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/sub-list.html(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Cmn

### Inherited properties

From [androidx.compose.ui.text.font.FontFamily](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily#canLoadSynchronously()`

**This property is deprecated.** Unused property that has no meaning.
Cmn From [kotlin.collections.List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/size.html` Cmn

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

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

## Public properties

### fonts

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val fonts: List<Font>
```

The fallback list of fonts used for resolving typefaces for this FontFamily.