cra*_*s84 5 fonts android textview webview
I have a TextView placed directly above a WebView. I am attempting to make the font style in the WebView match the font style in the TextView.
I was able to make the fonts the same size but there are still minor differences between the fonts' rendering (see screenshot comparison). Now I think this is very minor but our client was able to see the difference and was questioning it.
Is there any way to eliminate these rendering differences between TextView and WebView? If not can someone explain the reason for the differences? Are these differences caused simply because the WebView uses WebKit which has its own font rendering engine separate from the rest of the Android platform?

我不确定 TextView,但我知道 WebView 能够将文本定位在非像素对齐的边界上,我认为这就是您所看到的。WebView 和 TextView 输出看起来不同,因为它们的位置偏移量小于一个像素。
我假设您的客户要么使用低密度设备,要么目光非常敏锐=)
如果稍微调整文本的位置,它最终看起来应该是一样的。就 WebView 而言,它可能有助于确保关闭所有缩放和重新格式化功能。
| 归档时间: |
|
| 查看次数: |
1027 次 |
| 最近记录: |