![]() ![]() ![]() When the system can’t find a suitable font for bold or cursive text, Android compensates it by stretching characters for fake bold and by tilting for fake italic. Usually it is enough to specify only fonts for normal glyph (- 400) and standard bold one (- 700) in the font family file.įor details about font saturation, look here. The table below shows some common names of saturation: Value is set from 100 to 900 with a 100 pitch. The attribute fontStyle determines individual font style - normal (normal) or cursive (italic).įontWeight establishes font weight, a/k/a font saturation.Īnd of course, font sets a font which will be used at the given fontWeight and fontStyle. In this way, the system will be able to choose the correct font depending on the text style that you use. ![]() You can create a new font family as an XML resource and access it as a single item, instead of referencing each style and weight as separate resources. Font family is a set of fonts with their font styles and weights. Since API 26 was released, an ability to combine fonts into font families has appeared. I would like to explain this problem and share its solution. Recently I experienced the problem of fake bold and italics using the font family in Android. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |