# SpannedSubject.Typefaced

# SpannedSubject.Typefaced

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.Typefaced)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.Typefaced "View this page in Java")

<br />

```
interface SpannedSubject.Typefaced
```

<br />

*** ** * ** ***

Allows assertions about the typeface of a span.

## Summary

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | [withFamily](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.Typefaced#withFamily(java.lang.String))`(fontFamily: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)` Checks that at least one of the matched spans has the expected`fontFamily`. |

## Public functions

### withFamily

```
fun withFamily(fontFamily: String!): SpannedSubject.AndSpanFlags!
```

Checks that at least one of the matched spans has the expected`fontFamily`.  

|                                             Parameters                                             |
|----------------------------------------------------------------------------------------------------|---------------------------|
| `fontFamily: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | The expected font family. |

|                                                                    Returns                                                                    |
|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | A[WithSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags)object for optional additional assertions on the flags. |