Skip to content Skip to sidebar Skip to footer

Is It Possible To Style The Android Fonts Styles With Leading And Tracking?

Is it possible to have the followings in android font styling. Leading (the space vertically between lines of text - name comes from the physical piece of lead that used to be use

Solution 1:

  1. You can change leading by calling TextView's method setLineSpacing() or changing corresponding XML attributes of TextView in layout (android:lineSpacingExtra or android:lineSpacingMultiplier).

  2. As answered here:

AFAIK, you cannot adjust kerning in TextView. You may be able to adjust kerning if you draw the text on the Canvas yourself using the 2D graphics APIs.

Update: since API 21 there is an option to set kerning/tracking/letter spacing. You can call method setLetterSpacing() or set it in XML with attribute letterSpacing.

Solution 2:

For Tracking, check out this answer. It works fine for me.

Post a Comment for "Is It Possible To Style The Android Fonts Styles With Leading And Tracking?"