Skip to content

Commit

Permalink
💄 Add Twindexx font for greetings (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheubuch authored Apr 24, 2024
1 parent 726bccd commit fd687d5
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 29 deletions.
6 changes: 5 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ android {
}
}

aboutLibraries {
configPath = "config"
}

dependencies {
// Jetpack Compose
def composeVersion = "1.5.0"
Expand Down Expand Up @@ -164,7 +168,7 @@ dependencies {
implementation "de.c1710:filemojicompat-autoinit:3.2.5"

// OSS licenses
implementation "com.mikepenz:aboutlibraries-compose:10.8.3"
implementation "com.mikepenz:aboutlibraries-compose:11.1.3"

// Feature flags
implementation "io.getunleash:unleash-android-proxy-sdk:0.5.5"
Expand Down
35 changes: 19 additions & 16 deletions app/src/main/kotlin/de/hbch/traewelling/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@ import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import de.hbch.traewelling.R

val raleway = FontFamily(Font(R.font.raleway))
val RalewayFont = Font(R.font.raleway)
val TwindexxFont = Font(R.font.ae_matrix16_twindexx_standard)
val Raleway = FontFamily(RalewayFont)
val Twindexx = FontFamily(TwindexxFont)

private val defaultTypography = Typography()
val AppTypography = Typography(
displayLarge = defaultTypography.displayLarge.copy(fontFamily = raleway),
displayMedium = defaultTypography.displayMedium.copy(fontFamily = raleway),
displaySmall = defaultTypography.displaySmall.copy(fontFamily = raleway),
headlineLarge = defaultTypography.headlineLarge.copy(fontFamily = raleway),
headlineMedium = defaultTypography.headlineMedium.copy(fontFamily = raleway),
headlineSmall = defaultTypography.headlineSmall.copy(fontFamily = raleway),
titleLarge = defaultTypography.titleLarge.copy(fontFamily = raleway),
titleMedium = defaultTypography.titleMedium.copy(fontFamily = raleway),
titleSmall = defaultTypography.titleSmall.copy(fontFamily = raleway),
bodyLarge = defaultTypography.bodyLarge.copy(fontFamily = raleway),
bodyMedium = defaultTypography.bodyMedium.copy(fontFamily = raleway),
bodySmall = defaultTypography.bodySmall.copy(fontFamily = raleway),
labelLarge = defaultTypography.labelLarge.copy(fontFamily = raleway),
labelMedium = defaultTypography.labelMedium.copy(fontFamily = raleway),
labelSmall = defaultTypography.labelSmall.copy(fontFamily = raleway)
displayLarge = defaultTypography.displayLarge.copy(fontFamily = Raleway),
displayMedium = defaultTypography.displayMedium.copy(fontFamily = Raleway),
displaySmall = defaultTypography.displaySmall.copy(fontFamily = Raleway),
headlineLarge = defaultTypography.headlineLarge.copy(fontFamily = Raleway),
headlineMedium = defaultTypography.headlineMedium.copy(fontFamily = Raleway),
headlineSmall = defaultTypography.headlineSmall.copy(fontFamily = Raleway),
titleLarge = defaultTypography.titleLarge.copy(fontFamily = Raleway),
titleMedium = defaultTypography.titleMedium.copy(fontFamily = Raleway),
titleSmall = defaultTypography.titleSmall.copy(fontFamily = Raleway),
bodyLarge = defaultTypography.bodyLarge.copy(fontFamily = Raleway),
bodyMedium = defaultTypography.bodyMedium.copy(fontFamily = Raleway),
bodySmall = defaultTypography.bodySmall.copy(fontFamily = Raleway),
labelLarge = defaultTypography.labelLarge.copy(fontFamily = Raleway),
labelMedium = defaultTypography.labelMedium.copy(fontFamily = Raleway),
labelSmall = defaultTypography.labelSmall.copy(fontFamily = Raleway)
)

val LineIconStyle = defaultTypography.bodyMedium
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import androidx.lifecycle.LiveData
import de.hbch.traewelling.api.models.station.Station
import de.hbch.traewelling.api.models.user.User
import de.hbch.traewelling.theme.AppTypography
import de.hbch.traewelling.theme.LocalColorScheme
import de.hbch.traewelling.theme.Twindexx
import de.hbch.traewelling.ui.search.Search
import de.hbch.traewelling.util.getGreeting

Expand All @@ -38,8 +40,10 @@ fun CardSearch(
) {
Text(
text = getGreeting(),
style = AppTypography.headlineSmall,
modifier = Modifier.padding(8.dp)
style = AppTypography.headlineLarge,
modifier = Modifier.padding(8.dp),
fontFamily = Twindexx,
color = LocalColorScheme.current.onPrimaryContainer
)
Search(
homelandStation = homelandStation,
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/de/hbch/traewelling/ui/info/Info.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fun InfoScreen(
IconButton(onClick = backPressed) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(id = R.string.jwt_expiration)
contentDescription = null
)
}
}
Expand Down
Binary file not shown.
Binary file removed app/src/main/res/font/nunito.ttf
Binary file not shown.
8 changes: 4 additions & 4 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@
<string name="update_line_icons">Hier kannst du die Linien-Icons aktualisieren.</string>
<string name="last_updated">Zuletzt aktualisiert: %1$s</string>
<string name="refresh">Aktualisieren</string>
<string name="greeting_morning">Guten Morgen! ☕</string>
<string name="greeting_day">Guten Tag! 🌞</string>
<string name="greeting_evening">Guten Abend!</string>
<string name="greeting_night">Na, noch wach? 😴</string>
<string name="greeting_morning">Guten Morgen zZz</string>
<string name="greeting_day">Hab einen schönen Tag</string>
<string name="greeting_evening">Guten Abend :)</string>
<string name="greeting_night">Du bist ja lang wach :O</string>
<string name="stops">Haltestellen</string>
<string name="users">Benutzer</string>
<string name="search_stop_users">Haltestelle oder Benutzer suchen</string>
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@
<string name="update_line_icons">Here you can update the line icons.</string>
<string name="last_updated">Last updated: %1$s</string>
<string name="refresh">Refresh</string>
<string name="greeting_morning">Good morning! ☕</string>
<string name="greeting_day">Have a nice day! 🌞</string>
<string name="greeting_evening">Good evening!</string>
<string name="greeting_night">Still awake? 😴</string>
<string name="greeting_morning">Good morning zZz</string>
<string name="greeting_day">Have a nice day</string>
<string name="greeting_evening">Good evening :)</string>
<string name="greeting_night">You are awake long :O</string>
<string name="stops">Stops</string>
<string name="users">Users</string>
<string name="search_stop_users">Find stops or users</string>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:8.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:10.8.3"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:11.1.3"
classpath "com.google.gms:google-services:4.4.1"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
14 changes: 14 additions & 0 deletions config/libraries/ae-matrix16-twindexx-standard.ttf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"uniqueId": "ae:matrix16.twindexx",
"developers": [
{
"organisationUrl": "",
"name": "AEBahn"
}
],
"artifactVersion": "001.0000",
"name": "AE_Matrix16_Twindexx",
"licenses": [
"SIL Open Font License"
]
}

0 comments on commit fd687d5

Please sign in to comment.