font applied
This commit is contained in:
parent
714e7d9820
commit
97d8d2abd9
@ -39,7 +39,6 @@ import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.text.TextRange
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
@ -233,8 +232,7 @@ private fun ManualCardEntryScreen(
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
textStyle = MaterialTheme.typography.bodyLarge.copy(
|
||||
letterSpacing = 2.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
letterSpacing = 2.sp
|
||||
)
|
||||
)
|
||||
|
||||
@ -263,8 +261,7 @@ private fun ManualCardEntryScreen(
|
||||
.width(160.dp)
|
||||
.focusRequester(expiryFocusRequester),
|
||||
textStyle = MaterialTheme.typography.bodyLarge.copy(
|
||||
letterSpacing = 2.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
letterSpacing = 2.sp
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -284,7 +281,6 @@ private fun ManualCardEntryScreen(
|
||||
Text(
|
||||
text = "**** **** **** ${pan.takeLast(4)}",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
fontFamily = FontFamily.Monospace,
|
||||
letterSpacing = 1.5.sp
|
||||
)
|
||||
if (expiry.length == 4) {
|
||||
|
||||
@ -26,7 +26,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
@ -178,12 +177,12 @@ fun ReceiptPreview(
|
||||
) {
|
||||
Text(
|
||||
text = "MOB POS",
|
||||
style = MaterialTheme.typography.headlineLarge.copy(fontFamily = FontFamily.Monospace)
|
||||
style = MaterialTheme.typography.headlineLarge
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = "Transaction Receipt",
|
||||
style = MaterialTheme.typography.bodyMedium.copy(fontFamily = FontFamily.Monospace)
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
ReceiptDivider()
|
||||
@ -202,14 +201,14 @@ fun ReceiptPreview(
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = "Thank You",
|
||||
style = MaterialTheme.typography.titleMedium.copy(fontFamily = FontFamily.Monospace)
|
||||
style = MaterialTheme.typography.titleMedium
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
|
||||
Text(
|
||||
text = "Please keep this receipt",
|
||||
style = MaterialTheme.typography.bodySmall.copy(fontFamily = FontFamily.Monospace)
|
||||
style = MaterialTheme.typography.bodySmall
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -227,13 +226,13 @@ fun ReceiptRow(
|
||||
) {
|
||||
Text(
|
||||
text = label,
|
||||
style = MaterialTheme.typography.bodyMedium.copy(fontFamily = FontFamily.Monospace),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = Color.Gray
|
||||
)
|
||||
|
||||
Text(
|
||||
text = value,
|
||||
style = MaterialTheme.typography.titleSmall.copy(fontFamily = FontFamily.Monospace)
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -245,7 +244,6 @@ fun ReceiptDivider() {
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 10.dp),
|
||||
text = "--------------------------------",
|
||||
fontFamily = FontFamily.Monospace,
|
||||
color = Color.Gray
|
||||
)
|
||||
}
|
||||
|
||||
@ -1,74 +1,93 @@
|
||||
package com.mob.utsmyanmar.ui.theme
|
||||
|
||||
import androidx.compose.ui.text.font.Font
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.mob.utsmyanmar.R
|
||||
|
||||
private val LibreBaskerville = FontFamily(
|
||||
Font(R.font.libre_baskerville_regular, FontWeight.Normal)
|
||||
)
|
||||
|
||||
val Typography = Typography(
|
||||
displayLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 40.sp,
|
||||
),
|
||||
displayMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 30.sp,
|
||||
lineHeight = 38.sp,
|
||||
),
|
||||
headlineLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 24.sp,
|
||||
lineHeight = 32.sp,
|
||||
),
|
||||
headlineMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 20.sp,
|
||||
lineHeight = 28.sp,
|
||||
),
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontSize = 22.sp,
|
||||
lineHeight = 28.sp,
|
||||
),
|
||||
titleMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontSize = 18.sp,
|
||||
lineHeight = 26.sp,
|
||||
),
|
||||
titleSmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
),
|
||||
bodyMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
bodySmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
),
|
||||
labelLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
labelMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
),
|
||||
labelSmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 11.sp,
|
||||
lineHeight = 16.sp,
|
||||
|
||||
BIN
app/src/main/res/font/libre_baskerville_regular.ttf
Normal file
BIN
app/src/main/res/font/libre_baskerville_regular.ttf
Normal file
Binary file not shown.
@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.MOBPOS" parent="android:style/Theme.Material.Light.NoActionBar"/>
|
||||
<style name="Theme.MOBPOS" parent="android:style/Theme.Material.Light.NoActionBar">
|
||||
<item name="fontFamily">@font/libre_baskerville_regular</item>
|
||||
<item name="android:fontFamily">@font/libre_baskerville_regular</item>
|
||||
</style>
|
||||
</resources>
|
||||
Loading…
Reference in New Issue
Block a user