Bundled font

You can bundle fonts as resources in an app. Fonts are compiled in
R file and are automatically available in the system as a
resource. You can then access these fonts with the help of the
font resource type.

file location:

res/font/filename.ttf
(.ttf, .ttc, .otf, or
.xml)
The filename is used as the resource ID.

Keyword. Defines the font style. This attribute is
used when the font is loaded into the font stack and overrides
any style information in the font's header tables. If you do not
specify the attribute, the app uses the value from the font's
header tables. The constant value must be either
normal or italic.

android:fontWeight

Integer. The weight of the font. This attribute is
used when the font is loaded into the font stack and overrides
any weight information in the font's header tables. The
attribute value must be a positive number, a multiple
of 100, and between 100 and 900, inclusive. If you do not specify
the attribute, the app uses the value from the font's header
tables.The most common values are 400 for regular weight and 700
for bold weight.

String. Required. The authority of the font
provider that defines the font request.

android:fontProviderPackage

String. Required. The package name of the Font
Provider to be used for the request. This is used to verify the
identify of the provider.

android:fontProviderQuery

String. Required. The string query of the font.
Refer to your font provider's documentation on the format of this
string.

android:fontProviderCerts

Array resource. Required. Defines the sets of
hashes for the certificates used to sign this provider. This is
used to verify the identity of the provider and is only required
if the provider is not part of the system image. The value can
point to a single list (string array resource) or a list of lists
(array resource), where each individual list represents one
collection of signature hashes. Refer to your font provider's
documentation for these values.