是否有可能样式android的字体风格与领先和跟踪? [英] Is it possible to style the android fonts styles with leading and tracking?

查看:179
本文介绍了是否有可能样式android的字体风格与领先和跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在Android的字体样式如下。

  1. 领导(垂直文本行之间的空间 - 名称来源于铅的物理块所用在机械印刷过程​​以分离行文本)的使用。

  2. 跟踪(每个字符之间的水平空间)。

如果您有任何意见,请与我分享。

解决方案
  1. 您可以更改主要通过调用TextView中的方法,<一个href="http://developer.android.com/reference/android/widget/TextView.html#setLineSpacing%28float,%20float%29"><$c$c>setLineSpacing()或者布局改变TextView中的相应的XML属性(安卓lineSpacingExtra 安卓lineSpacingMultiplier )。

  2. 作为回答<一href="http://stackoverflow.com/questions/1640659/how-to-adjust-text-kerning-in-android-textview/1644061#1644061">here:

  

AFAIK,你不能在TextView的调整字距。您可以调整字距如果使用2D图形API绘制在画布上自己的文字。

Is it possible to have the followings in android font styling.

  1. Leading (the space vertically between lines of text - name comes from the physical piece of lead that used to be used in mechanical printing process to separate lines of text).

  2. Tracking (the horizontal space between each character).

If you have any ideas please share with me.

解决方案

  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.

这篇关于是否有可能样式android的字体风格与领先和跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆