[android-components](../../index.md) / [mozilla.components.support.ktx.android.util](../index.md) / [kotlin.Float](index.md) / [spToPx](./sp-to-px.md)

# spToPx

`fun `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`.spToPx(displayMetrics: <ERROR CLASS>): <ERROR CLASS>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/util/DisplayMetrics.kt#L26)

Converts a value in scale independent pixels (sp) to a px value.

