Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'Jost' with 'Tilda Sans' font #91

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/dictionaries/pzedler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
binding.linearAboutGithub,
binding.linearAboutTranslation,
binding.linearAboutPrivacy,
binding.linearAboutLicenseJost,
binding.linearAboutLicenseTilda,
binding.linearAboutLicenseMaterialComponents,
binding.linearAboutLicenseMaterialIcons
);
Expand Down Expand Up @@ -123,10 +123,10 @@ public void onClick(View v) {
new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.app_privacy)))
), 300
);
} else if (id == R.id.linear_about_license_jost) {
ViewUtil.startIcon(binding.imageAboutLicenseJost);
} else if (id == R.id.linear_about_license_tilda) {
ViewUtil.startIcon(binding.imageAboutLicenseTilda);
activity.showTextBottomSheet(
R.raw.license_ofl, R.string.license_jost, R.string.license_jost_link
R.raw.license_ofl, R.string.license_tilda, R.string.license_tilda_link
);
} else if (id == R.id.linear_about_license_material_components) {
ViewUtil.startIcon(binding.imageAboutLicenseMaterialComponents);
Expand Down
Binary file removed app/src/main/res/font/jost_book.ttf
Binary file not shown.
Binary file removed app/src/main/res/font/jost_medium.ttf
Binary file not shown.
Binary file added app/src/main/res/font/tilda_480book.ttf
Binary file not shown.
Binary file added app/src/main/res/font/tilda_610medium.ttf
Binary file not shown.
8 changes: 4 additions & 4 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@
android:text="@string/title_licenses" />

<LinearLayout
android:id="@+id/linear_about_license_jost"
android:id="@+id/linear_about_license_tilda"
style="@style/Widget.Doodle.LinearLayout.ListItem.TwoLine.Clickable">

<ImageView
android:id="@+id/image_about_license_jost"
android:id="@+id/image_about_license_tilda"
style="@style/Widget.Doodle.ImageView.ListItem.Icon"
android:src="@drawable/ic_round_copyright_anim"
tools:ignore="ContentDescription" />
Expand All @@ -243,11 +243,11 @@

<TextView
style="@style/Widget.Doodle.TextView.ListItem.Title"
android:text="@string/license_jost" />
android:text="@string/license_tilda" />

<TextView
style="@style/Widget.Doodle.TextView.ListItem.Description"
android:text="@string/license_jost_author" />
android:text="@string/license_tilda_author" />

</LinearLayout>

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@

<!-- LICENSES -->

<string name="license_jost" translatable="false">Jost* Typeface</string>
<string name="license_jost_author" translatable="false">Owen Earl</string>
<string name="license_jost_link" translatable="false">https://github.com/indestructible-type/Jost</string>
<string name="license_tilda" translatable="false">Tilda Sans Typeface</string>
<string name="license_tilda_author" translatable="false">Paratype × Tilda</string>
<string name="license_tilda_link" translatable="false">https://tilda.cc/lp/tildasans/</string>
<string name="license_author_google" translatable="false">Google</string>
<string name="license_material_components" translatable="false">Material Components Android</string>
<string name="license_material_components_link" translatable="false">https://github.com/material-components/material-components-android</string>
Expand Down
82 changes: 41 additions & 41 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

<resources xmlns:tools="http://schemas.android.com/tools">

<!-- For languages not supported by Jost*, the system font will be used as fallback.
If the system font is used, the medium variant of Jost* won't be replaced by a medium/bold
<!-- For languages not supported by Tilda Sans, the system font will be used as fallback.
If the system font is used, the medium variant of Tilda Sans won't be replaced by a medium/bold
variant of the system font, so we have to configure these texts to be styled bold for these
locales with textStyle="bold".
Untranslated text (names or untranslated strings) with textStyle set to bold will look like
the medium variant of Jost*, so there is no extra attention needed for e.g. the app bar.
the medium variant of Tilda Sans, so there is no extra attention needed for e.g. the app bar.
Affected languages: Arab, Chinese, Hebrew, Japanese, Uighur -->

<style name="ThemeOverlay.Doodle.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
Expand Down Expand Up @@ -81,8 +81,8 @@
<style
name="Widget.Doodle.Button.TextButton.Snackbar"
parent="Widget.Material3.Button.TextButton.Snackbar">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- ImageView (icons) -->
Expand Down Expand Up @@ -114,8 +114,8 @@
<style
name="Widget.Doodle.Button.UnelevatedButton"
parent="Base.Doodle.Button.UnelevatedButton">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- Base style -->
Expand All @@ -131,8 +131,8 @@
<style
name="Widget.Doodle.Button.OutlinedButton"
parent="Base.Doodle.Button.OutlinedButton">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- Base style -->
Expand All @@ -148,17 +148,17 @@
<style
name="Widget.Doodle.Button.TextButton"
parent="Base.Doodle.Button.TextButton">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- Localized style, no empty base style needed -->
<style
name="Widget.Doodle.Button.TextButton.Dialog"
parent="Widget.Material3.Button.TextButton.Dialog">
<item name="android:singleLine">true</item>
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<style
Expand Down Expand Up @@ -239,8 +239,8 @@
<style
name="Widget.Doodle.ExtendedFloatingActionButton"
parent="Widget.Material3.ExtendedFloatingActionButton.Primary">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- TimePicker -->
Expand All @@ -261,8 +261,8 @@
<style
name="TextAppearance.Doodle.TimePicker.Title"
parent="TextAppearance.Material3.MaterialTimePicker.Title">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<style
Expand All @@ -275,8 +275,8 @@
<style
name="TextAppearance.Doodle.TimePicker.DisplayLarge"
parent="TextAppearance.Material3.DisplayLarge">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<style
Expand All @@ -288,8 +288,8 @@
<style
name="TextAppearance.Doodle.TimePicker.HeadlineMedium"
parent="TextAppearance.Material3.HeadlineMedium">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<style
Expand All @@ -304,8 +304,8 @@
<style
name="Widget.Doodle.Button.TextButton.Dialog.Flush"
parent="Widget.Material3.Button.TextButton.Dialog.Flush">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- LinearLayout (lists) -->
Expand Down Expand Up @@ -426,8 +426,8 @@
<item name="android:textAppearance">?attr/textAppearanceBodyLarge</item>
<item name="android:textColor">?attr/colorOnBackground</item>
<item name="android:textAlignment">viewStart</item>
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
<item name="android:breakStrategy" tools:targetApi="m">high_quality</item>
<item name="android:hyphenationFrequency" tools:targetApi="m">full</item>
<item name="android:lineBreakWordStyle" tools:targetApi="33">phrase</item>
Expand All @@ -440,8 +440,8 @@

<!-- Localized style, no empty base style needed -->
<style name="Widget.Doodle.TextView.Medium" parent="Widget.Doodle.TextView">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<style name="Widget.Doodle.TextView.Paragraph" parent="Widget.Doodle.TextView">
Expand Down Expand Up @@ -531,41 +531,41 @@
<!-- TextAppearance -->

<style name="TextAppearance.Doodle.HeadlineLarge" parent="TextAppearance.Material3.HeadlineLarge">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<style name="TextAppearance.Doodle.HeadlineMedium" parent="TextAppearance.Material3.HeadlineMedium">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<style name="TextAppearance.Doodle.HeadlineSmall" parent="TextAppearance.Material3.HeadlineSmall">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<style name="TextAppearance.Doodle.TitleLarge" parent="TextAppearance.Material3.TitleLarge">
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

<!-- Localized style, no empty base style needed -->
<style name="TextAppearance.Doodle.TitleMedium" parent="TextAppearance.Material3.TitleMedium">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<!-- Localized style, no empty base style needed -->
<style name="TextAppearance.Doodle.LabelLarge" parent="TextAppearance.Material3.LabelLarge">
<item name="android:fontFamily">@font/jost_medium</item>
<item name="fontFamily">@font/jost_medium</item>
<item name="android:fontFamily">@font/tilda_610medium</item>
<item name="fontFamily">@font/tilda_610medium</item>
</style>

<style name="TextAppearance.Doodle.Tooltip" parent="TextAppearance.MaterialComponents.Tooltip">
<item name="android:textColor">?android:attr/colorBackground</item>
<item name="android:fontFamily">@font/jost_book</item>
<item name="fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>
<item name="fontFamily">@font/tilda_480book</item>
</style>

</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<item name="android:colorControlActivated">?attr/colorSecondary</item>
<item name="android:colorEdgeEffect">?attr/colorSecondary</item>

<item name="android:fontFamily">@font/jost_book</item>
<item name="android:fontFamily">@font/tilda_480book</item>

<!-- Widget styles -->
<item name="snackbarStyle">@style/Widget.Doodle.Snackbar</item>
Expand Down