Created
September 10, 2018 18:30
-
-
Save JakeSteam/d9ae8eb85e2c37da8d4648f118609418 to your computer and use it in GitHub Desktop.
"Using multi-weighted custom fonts on Android" for blog.jakelee.co.uk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="Font_Regular" tools:keep="@style/Font_Regular"> | |
<item name="android:fontFamily">@font/the_sans_c4s</item> | |
</style> | |
<style name="Font_Regular_Italic" parent="Font_Regular" tools:keep="@style/Font_Regular_Italic"> | |
<item name="android:textStyle">italic</item> | |
</style> | |
<style name="Font_Bold" parent="Font_Regular" tools:keep="@style/Font_Bold"> | |
<item name="android:textStyle">bold</item> | |
</style> | |
<style name="Font_Bold_Italic" parent="Font_Regular" tools:keep="@style/Font_Bold_Italic"> | |
<item name="android:textStyle">bold|italic</item> | |
</style> | |
<style name="Font_SemiLight"> | |
<item name="android:fontFamily">@font/the_sans_c4s_semi</item> | |
</style> | |
<style name="Font_SemiLight_Italic" parent="Font_SemiLight" tools:keep="@style/Font_SemiLight_Italic"> | |
<item name="android:textStyle">italic</item> | |
</style> | |
<style name="Font_SemiBold" parent="Font_SemiLight" tools:keep="@style/Font_SemiBold"> | |
<item name="android:textStyle">bold</item> | |
</style> | |
<style name="Font_SemiBold_Italic" parent="Font_SemiLight"> | |
<item name="android:textStyle">bold|italic</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<font-family | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<font | |
app:fontStyle="normal" | |
app:fontWeight="400" | |
app:font="@font/the_sans_c4s_regular"/> | |
<font | |
app:fontStyle="italic" | |
app:fontWeight="400" | |
app:font="@font/the_sans_c4s_regular_italic"/> | |
<font | |
app:fontStyle="normal" | |
app:fontWeight="700" | |
app:font="@font/the_sans_c4s_bold"/> | |
<font | |
app:fontStyle="italic" | |
app:fontWeight="700" | |
app:font="@font/the_sans_c4s_bold_italic"/> | |
</font-family> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<font-family | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<font | |
app:fontStyle="normal" | |
app:fontWeight="400" | |
app:font="@font/the_sans_c4s_semilight"/> | |
<font | |
app:fontStyle="italic" | |
app:fontWeight="400" | |
app:font="@font/the_sans_c4s_semilight_italic"/> | |
<font | |
app:fontStyle="normal" | |
app:fontWeight="700" | |
app:font="@font/the_sans_c4s_semibold"/> | |
<font | |
app:fontStyle="italic" | |
app:fontWeight="700" | |
app:font="@font/the_sans_c4s_semibold_italic"/> | |
</font-family> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment