Шрифт Iosevka для значений датчиков
This commit is contained in:
parent
9739d1cdfe
commit
4c3584d63c
3 changed files with 13 additions and 1 deletions
10
app/src/main/java/ru/nm17/narodmon/ui/Font.kt
Normal file
10
app/src/main/java/ru/nm17/narodmon/ui/Font.kt
Normal file
|
@ -0,0 +1,10 @@
|
|||
package ru.nm17.narodmon.ui
|
||||
|
||||
import androidx.compose.ui.text.font.Font
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import ru.nm17.narodmon.R
|
||||
|
||||
val iosevkaFamily = FontFamily(
|
||||
Font(R.font.iosevka, FontWeight.Medium)
|
||||
)
|
|
@ -44,6 +44,7 @@ import ru.nm17.narodmon.R
|
|||
import ru.nm17.narodmon.db.entities.SensorType
|
||||
import ru.nm17.narodmon.ui.elements.GenericNavScaffold
|
||||
import ru.nm17.narodmon.ui.elements.TileMap
|
||||
import ru.nm17.narodmon.ui.iosevkaFamily
|
||||
|
||||
data class Sensor(
|
||||
// TODO: Вынести в отдельный класс, и явно не в директорию `ui`
|
||||
|
@ -322,7 +323,8 @@ fun SensorItem(sensor: Sensor) {
|
|||
) {
|
||||
Text(
|
||||
text = "${sensor.value} ${sensor.unit}",
|
||||
fontFamily = FontFamily.Monospace,
|
||||
fontFamily = iosevkaFamily,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
modifier = Modifier.padding(horizontal = 3.dp, vertical = 1.dp)
|
||||
)
|
||||
|
|
BIN
app/src/main/res/font/iosevka.ttf
Normal file
BIN
app/src/main/res/font/iosevka.ttf
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue