

android:fontWeight: Set the thickness of the font. This fontWeight value is detailed on the Google Font Montserrat, and the corresponding list can also be found on FontWeight .

android:fontStyle: Set the font to be normal or italic.android:font: Specify the corresponding font file.In montserrat.xml, each font file has its corresponding.

Move these font files into the res/font/ folder in the project. If res/font/ does not exist, please create it first. Then, under res/font/, add an XML file called montserrat.xml, the code is as follows. Change filenames as Android requires Adding Font Resource Downloaded Montserrat Fontīefore moving these fonts into the project, we must first change the file names, because Android project requires file names to be lowercase and underscore (_). We rename all files as follows. Montserrat Font SiteĪfter downloading fonts, unzip the compressed file, you can see the following font files. As described on the site, each font file corresponds to a different weight and italic. We use Montserrat from Google Fonts as an example. Browse Montserrat’s font website, you can see that Montserrat has many fonts. Click on the top right to download all Montserrat fonts.
