Can I style Android font styles with lead and tracker?

Is it possible to use the font style for Android.

  • Leading (space vertically between lines of text - the name comes from a physical piece of lead, which was used to mechanically print individual lines of text).

  • Tracking (horizontal space between each character).

If you have any ideas, share with me.

+14
android android-textview android-fonts
Apr 11 2018-11-11T00:
source share
2 answers
  • You can change the moderator by calling the TextView setLineSpacing() method or by changing the corresponding XML attributes of the TextView in the layout ( android:lineSpacingExtra or android:lineSpacingMultiplier ).

  • As answered here :

AFAIK, you cannot configure kerning in TextView. You can configure kerning if you draw text on Canvas yourself using the 2D graphics APIs.

Update : since API 21 has the ability to set kerning / tracking / spacing between letters. You can call the setLetterSpacing() method or set it to XML with the letterSpacing attribute.

+9
Jun 13 2018-11-11T00:
source share

For Tracking , select this answer . This works great for me.

+1
May 08 '13 at 4:39
source share



All Articles