Starting with Android O, variable fonts were supported for Android. To this day, they continue to be. With no way to change font weight besides download separate files, it gets overwhelming. So overwhelming that your application can’t hold your font files anymore, you have too many!
* Scroll down a bit to see an exmple!
- A variable font, you can get one from fonts.google.com
- Find your favorite font and use the Download family button in the top-right corner.
- Unzip the downloaded file.
- Find <𝚢𝚘𝚞𝚛-𝚏𝚘𝚗𝚝>-𝚅𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝙵𝚘𝚗𝚝, it should appear in the root directory. Rename it if you’d like.
- Upload it to your Kodular project!
- Set is as your font for the “Font” property.
- A label component
- Other components aren’t yet supported.
- The font weight you’d like your font to be displayed in
- This value is normally between 100 and 900.
- The font width you’d like your font to be displayed in
- I’m not even sure how this works, but try for yourself. Setting this to -𝟷 will set it to default!
- An OTF file wasn’t tested
- Most fonts from fonts.google.com only offer TTF variants.
- OTF files are expected to work.
- A TTF file was tested and worked fine
- Others were not considered or don’t work with Android
No, however, no minimum Android version is needed to use Font Variation. This was taken into consideration considering only about 7% of the Android population is running Android O. There is a check in place to make sure it only works on Android O and onwards, nothing will happen unless you’re running Android O and onward.