Skip to content
This repository was archived by the owner on Sep 3, 2023. It is now read-only.

Conversation

@G00fY2
Copy link

@G00fY2 G00fY2 commented Jun 21, 2020

Currently the attributes for custom fonts are limited to font resource references only.

<item name="md_font_title">@font/your_font</item>
<item name="md_font_body">@font/your_font</item>
<item name="md_font_button">@font/your_font</item>

It is not possible to reference system fonts this way (e.g. the Roboto font family).

This PR is inspired by the TextView's android:fontFamily attribute and uses the same logic to resolve the typeface.

This PR will not interference with the current behavior, but it allows to additionally reference fonts by string:

<item name="md_font_title">sans-serif-black</item>
<item name="md_font_body">sans-serif-light</item>
<item name="md_font_button">@font/your_font</item>
@afollestad afollestad closed this Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants