Skip to content

Commit

Permalink
feat: Replace the Figerona font with Poppins
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi89999 committed Sep 23, 2024
1 parent 65b5f95 commit 4c20e80
Show file tree
Hide file tree
Showing 35 changed files with 104 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import coil.compose.AsyncImage
import coil.request.ImageRequest
import com.starry.myne.R
import com.starry.myne.ui.screens.settings.viewmodels.ThemeMode
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont

@Composable
fun BookDetailTopUI(
Expand Down Expand Up @@ -135,7 +135,7 @@ fun BookDetailTopUI(
)
.fillMaxWidth(),
fontSize = 24.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
maxLines = 3,
overflow = TextOverflow.Ellipsis,
fontWeight = FontWeight.Bold,
Expand All @@ -148,7 +148,7 @@ fun BookDetailTopUI(
start = 12.dp, end = 8.dp, top = 4.dp
),
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
Expand All @@ -162,7 +162,7 @@ fun BookDetailTopUI(
start = 12.dp, end = 8.dp, top = 8.dp
),
fontSize = 16.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/com/starry/myne/ui/common/BookItemCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import coil.request.ImageRequest
import com.starry.myne.R
import com.starry.myne.helpers.weakHapticFeedback
import com.starry.myne.ui.common.placeholder.placeholder
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont


@Composable
Expand Down Expand Up @@ -122,7 +122,7 @@ fun BookItemCard(
.placeholder(isLoading = loadingEffect),
fontStyle = MaterialTheme.typography.headlineMedium.fontStyle,
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Bold,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
Expand All @@ -137,7 +137,7 @@ fun BookItemCard(
color = MaterialTheme.colorScheme.onSurface,
maxLines = 2,
fontStyle = MaterialTheme.typography.bodySmall.fontStyle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontSize = 14.sp,
)

Expand All @@ -152,7 +152,7 @@ fun BookItemCard(
fontSize = 16.sp,
fontWeight = FontWeight.SemiBold,
fontStyle = MaterialTheme.typography.bodyMedium.fontStyle,
fontFamily = figeronaFont
fontFamily = poppinsFont
)

Text(
Expand All @@ -164,7 +164,7 @@ fun BookItemCard(
maxLines = 2,
overflow = TextOverflow.Ellipsis,
fontStyle = MaterialTheme.typography.bodySmall.fontStyle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontSize = 13.sp
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.starry.myne.helpers.book.BookLanguage
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont

@Composable
fun BookLanguageButton(language: BookLanguage, isSelected: Boolean, onClick: () -> Unit) {
Expand Down Expand Up @@ -64,7 +64,7 @@ fun BookLanguageButton(language: BookLanguage, isSelected: Boolean, onClick: ()
text = language.name,
fontSize = 18.sp,
fontStyle = MaterialTheme.typography.headlineMedium.fontStyle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Bold,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/starry/myne/ui/common/NetworkError.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import com.airbnb.lottie.compose.LottieConstants
import com.airbnb.lottie.compose.animateLottieCompositionAsState
import com.airbnb.lottie.compose.rememberLottieComposition
import com.starry.myne.R
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont


@Composable
Expand Down Expand Up @@ -88,7 +88,7 @@ fun NetworkError(errorMessage: String? = null, onRetryClicked: () -> Unit) {
.padding(top = 10.dp, bottom = 18.dp)
.fillMaxWidth(),
color = MaterialTheme.colorScheme.onBackground,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
textAlign = TextAlign.Center
)
Expand All @@ -97,7 +97,7 @@ fun NetworkError(errorMessage: String? = null, onRetryClicked: () -> Unit) {
Text(
text = stringResource(id = R.string.network_error_retry),
fontWeight = FontWeight.Medium,
fontFamily = figeronaFont
fontFamily = poppinsFont
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import com.starry.myne.helpers.weakHapticFeedback
import com.starry.myne.ui.common.CustomTopAppBar
import com.starry.myne.ui.navigation.Screens
import com.starry.myne.ui.screens.main.bottomNavPadding
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont


@Composable
Expand Down Expand Up @@ -119,7 +119,7 @@ private fun CategoriesItem(category: String, onClick: () -> Unit) {
text = category,
fontSize = 18.sp,
fontStyle = MaterialTheme.typography.headlineMedium.fontStyle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Bold,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import com.starry.myne.ui.common.BookDetailTopUI
import com.starry.myne.ui.common.NetworkError
import com.starry.myne.ui.common.ProgressDots
import com.starry.myne.ui.screens.detail.viewmodels.BookDetailViewModel
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont
import com.starry.myne.ui.theme.pacificoFont
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -316,7 +316,7 @@ private fun BookDetailContents(
text = stringResource(id = R.string.book_synopsis),
modifier = Modifier.padding(start = 12.dp, end = 8.dp),
fontSize = 20.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Bold,
color = MaterialTheme.colorScheme.onBackground,
)
Expand All @@ -326,7 +326,7 @@ private fun BookDetailContents(
Text(
text = synopsis,
modifier = Modifier.padding(14.dp),
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colorScheme.onBackground,
)
Expand Down Expand Up @@ -405,7 +405,7 @@ private fun MiddleBar(
text = bookLang,
modifier = Modifier.padding(top = 14.dp, bottom = 14.dp, start = 4.dp),
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onBackground,
)
Expand Down Expand Up @@ -434,7 +434,7 @@ private fun MiddleBar(
text = pageCount,
modifier = Modifier.padding(top = 14.dp, bottom = 14.dp, start = 4.dp),
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onBackground,
)
Expand Down Expand Up @@ -462,7 +462,7 @@ private fun MiddleBar(
text = downloadCount,
modifier = Modifier.padding(top = 14.dp, bottom = 14.dp, start = 4.dp),
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onBackground,
)
Expand All @@ -486,7 +486,7 @@ private fun MiddleBar(
Text(
text = buttonText,
fontSize = 18.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onPrimaryContainer,
)
Expand Down Expand Up @@ -580,7 +580,7 @@ private fun NoSynopsisUI() {
Text(
text = stringResource(id = R.string.book_synopsis_not_found),
modifier = Modifier.padding(14.dp),
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colorScheme.onBackground,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import com.starry.myne.ui.screens.home.viewmodels.HomeViewModel
import com.starry.myne.ui.screens.home.viewmodels.SearchBarState
import com.starry.myne.ui.screens.home.viewmodels.UserAction
import com.starry.myne.ui.screens.main.bottomNavPadding
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont
import com.starry.myne.ui.theme.pacificoFont
import kotlinx.coroutines.delay

Expand Down Expand Up @@ -459,7 +459,7 @@ private fun SearchAppBar(
placeholder = {
Text(
text = "Search...",
fontFamily = figeronaFont,
fontFamily = poppinsFont,
color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.5f)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ import com.starry.myne.ui.screens.library.viewmodels.LibraryViewModel
import com.starry.myne.ui.screens.main.bottomNavPadding
import com.starry.myne.ui.screens.settings.viewmodels.SettingsViewModel
import com.starry.myne.ui.screens.settings.viewmodels.ThemeMode
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import me.saket.swipe.SwipeAction
Expand Down Expand Up @@ -235,7 +235,7 @@ fun LibraryScreen(navController: NavController) {
Text(
text = stringResource(id = R.string.import_button_text),
fontWeight = FontWeight.Medium,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onPrimaryContainer
)
Expand Down Expand Up @@ -273,7 +273,7 @@ fun LibraryScreen(navController: NavController) {
Spacer(modifier = Modifier.width(24.dp))
Text(
text = stringResource(id = R.string.epub_importing),
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
fontSize = 17.sp,
)
Expand Down Expand Up @@ -521,7 +521,7 @@ private fun LibraryCard(
text = title,
fontStyle = MaterialTheme.typography.headlineMedium.fontStyle,
fontSize = 20.sp,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.SemiBold,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
Expand All @@ -533,7 +533,7 @@ private fun LibraryCard(
color = MaterialTheme.colorScheme.onSurface,
maxLines = 1,
fontStyle = MaterialTheme.typography.bodySmall.fontStyle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontWeight = FontWeight.Medium,
fontSize = 16.sp,
)
Expand All @@ -543,7 +543,7 @@ private fun LibraryCard(
Row {
Text(
text = fileSize,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
color = MaterialTheme.colorScheme.onSurface,
fontWeight = FontWeight.Light,
fontSize = 14.sp,
Expand All @@ -558,7 +558,7 @@ private fun LibraryCard(
)
Text(
text = date,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
color = MaterialTheme.colorScheme.onSurface,
fontWeight = FontWeight.Light,
fontSize = 14.sp,
Expand Down Expand Up @@ -611,7 +611,7 @@ private fun LibraryCardButton(
Text(
text = text,
fontWeight = FontWeight.Medium,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(start = 2.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import com.starry.myne.helpers.NetworkObserver
import com.starry.myne.ui.navigation.BottomBarScreen
import com.starry.myne.ui.navigation.NavGraph
import com.starry.myne.ui.navigation.Screens
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont

/**
* Padding for the bottom navigation bar.
Expand Down Expand Up @@ -171,7 +171,7 @@ private fun CustomBottomNavigationItem(
Text(
text = stringResource(id = screen.title),
color = contentColor,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
fontSize = 14.sp,
modifier = Modifier.padding(start = 4.dp)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import com.starry.myne.ui.screens.reader.activities.ReaderActivity
import com.starry.myne.ui.screens.reader.activities.ReaderConstants
import com.starry.myne.ui.screens.reader.viewmodels.ReaderDetailScreenState
import com.starry.myne.ui.screens.reader.viewmodels.ReaderDetailViewModel
import com.starry.myne.ui.theme.figeronaFont
import com.starry.myne.ui.theme.poppinsFont


@Composable
Expand Down Expand Up @@ -223,7 +223,7 @@ private fun ChapterItem(chapterTitle: String, onClick: () -> Unit) {
.weight(3f)
.padding(start = 12.dp),
text = chapterTitle,
fontFamily = figeronaFont,
fontFamily = poppinsFont,
color = MaterialTheme.colorScheme.onSurface,
fontSize = 16.sp,
fontWeight = FontWeight.Bold,
Expand Down
Loading

0 comments on commit 4c20e80

Please sign in to comment.