sirekanian 3 лет назад
Родитель
Сommit
0d8926c37b

+ 8 - 3
app/src/main/java/com/sirekanian/spacetime/ui/ImagePageContent.kt

@@ -1,6 +1,7 @@
 package com.sirekanian.spacetime.ui
 
 import androidx.compose.foundation.layout.*
+import androidx.compose.material.MaterialTheme
 import androidx.compose.material.Text
 import androidx.compose.material.icons.Icons
 import androidx.compose.material.icons.filled.ArrowBack
@@ -47,16 +48,20 @@ fun ImagePageContent(insets: PaddingValues, page: ImagePage, onDelete: () -> Uni
         horizontalAlignment = Alignment.CenterHorizontally,
         verticalArrangement = Arrangement.Center,
     ) {
-        Text(page.name)
+        Text(
+            text = page.name,
+            style = MaterialTheme.typography.h2,
+        )
         page.date.getRelativeDays()?.let { days ->
             Text(
-                when {
+                text = when {
                     days == 0 -> "today"
                     days == 1 -> "tomorrow"
                     days == -1 -> "yesterday"
                     days > 0 -> "in $days days"
                     else -> "${-days} days ago"
-                }
+                },
+                style = MaterialTheme.typography.h3,
             )
         }
     }

+ 19 - 11
app/src/main/java/com/sirekanian/spacetime/ui/theme/Type.kt

@@ -2,27 +2,35 @@ package com.sirekanian.spacetime.ui.theme
 
 import androidx.compose.material.Typography
 import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.Font
 import androidx.compose.ui.text.font.FontFamily
 import androidx.compose.ui.text.font.FontWeight
 import androidx.compose.ui.unit.sp
+import com.sirekanian.spacetime.R
+
+private val customFontFamily = FontFamily(
+    Font(R.font.amaticsc_regular, FontWeight.Normal),
+)
 
-// Set of Material typography styles to start with
 val Typography = Typography(
     body1 = TextStyle(
         fontFamily = FontFamily.Default,
         fontWeight = FontWeight.Normal,
         fontSize = 16.sp
-    )
-    /* Other default text styles to override
-    button = TextStyle(
-        fontFamily = FontFamily.Default,
-        fontWeight = FontWeight.W500,
-        fontSize = 14.sp
     ),
-    caption = TextStyle(
-        fontFamily = FontFamily.Default,
+    h2 = TextStyle(
+        fontFamily = customFontFamily,
+        fontWeight = FontWeight.Normal,
+        fontSize = 60.sp,
+    ),
+    h3 = TextStyle(
+        fontFamily = customFontFamily,
+        fontWeight = FontWeight.Normal,
+        fontSize = 48.sp,
+    ),
+    h4 = TextStyle(
+        fontFamily = customFontFamily,
         fontWeight = FontWeight.Normal,
-        fontSize = 12.sp
+        fontSize = 34.sp,
     )
-    */
 )

BIN
app/src/main/res/font/amaticsc_regular.ttf