imyetse / JustTextView

重写textview,实现较高性能的两端对齐textview
Apache License 2.0
37 stars 9 forks source link

当英文出现"合字"时,字符会偏移 #4

Open Muchenyao opened 4 years ago

Muchenyao commented 4 years ago

关于合字的解释 : https://zh.wikipedia.org/wiki/%E5%90%88%E5%AD%97

在Android系统中,默认的字体Roboto会有合字行为,比如fi会显示成: image

但是JustTextView在换行的时候,字符会出现偏移: image

目前只发现在换行的时候会立即出现该bug

Muchenyao commented 4 years ago

找到一个解决方法,设置属性

android:fontFeatureSettings="liga 0"

可以禁用合字。

链接:https://stackoverflow.com/questions/17655153/text-with-f-following-i-cannot-see-the-dot-on-the-i-sans-font