mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 12:57:04 +05:30
common: create indirection kludge to workaround compiler error
Without this the compiler fails to reason that the Manrope variable actually does get initialized.
This commit is contained in:
parent
b3dbbd31f3
commit
a351a35a43
3 changed files with 5 additions and 3 deletions
|
@ -7,7 +7,7 @@ import androidx.compose.ui.text.font.FontFamily
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import dev.msfjarvis.claw.common.R
|
||||
|
||||
actual val Manrope =
|
||||
actual fun createFontFamily() =
|
||||
FontFamily(
|
||||
Font(R.font.manrope_bold, FontWeight.Bold),
|
||||
Font(R.font.manrope_extrabold, FontWeight.ExtraBold),
|
||||
|
|
|
@ -6,7 +6,9 @@ import androidx.compose.ui.text.font.FontFamily
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
expect val Manrope: FontFamily
|
||||
expect fun createFontFamily(): FontFamily
|
||||
|
||||
private val Manrope = createFontFamily()
|
||||
|
||||
val AppTypography =
|
||||
Typography(
|
||||
|
|
|
@ -6,7 +6,7 @@ import androidx.compose.ui.text.font.FontFamily
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.platform.Font
|
||||
|
||||
actual val Manrope =
|
||||
actual fun createFontFamily() =
|
||||
FontFamily(
|
||||
Font("font/manrope_bold.ttf", FontWeight.Bold),
|
||||
Font("font/manrope_extrabold.ttf", FontWeight.ExtraBold),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue