Android等宽空格(& nbsp;)宽度与字符宽度不同 [英] Android monospace space ( ) width is different than character width

查看:730
本文介绍了Android等宽空格(& nbsp;)宽度与字符宽度不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个小的Webapp. 我尝试使用boxdrawing字符以某种ascii艺术方式显示一些输出. 但是,我注意到在Android上空格( )与其他字符的宽度不相等,导致输出难看.

I'm developing a little webapp. I tried displaying some output in an sort of ascii art way, using boxdrawing characters. However, I noticed that on Android the space ( ) isn't equal width with the other characters, leading to ugly output.

我将字体设置为monospace,甚至尝试了monospace,monospace CSS设置.

I've put the font as monospace and even tried the monospace,monospace CSS setting.

看看我在说什么:
请在Android和桌面浏览器上打开 https://tpgnow.herokuapp.com/CERN .

To see what I'm talking about:
Please open https://tpgnow.herokuapp.com/CERN on Android and on a desktop browser.

预期输出(桌面浏览器):

Expected Output (desktop browser):

实际输出(Android浏览器):

Actual Output (android browser):

我尝试了不同的浏览器,平台和设备. 它似乎可以在Win,Mac,Chrome和Firefox上运行,也可以在iOS上运行,但不能在Android上运行(Chrome和Firefox都不行).

I've tried different browsers and platforms and devices. It seems to work on Win, Mac, Chrome and Firefox, also on iOS, but not on Android (neither Chrome nor Firefox).

有人对此问题有解决方案吗?

Does anybody have a solution for this problem?

推荐答案

我遇到了这个完全相同的问题! 缺少Google字体中的框图绘制错误.

I ran into this exact same problem! Box drawing gliphs are missing in Google fonts.

Adob​​e的源代码Pro 拥有它们. Mononoki 也应该如此.

Adobe's Source Code Pro has them. Mononoki should too.

我怀疑Android monospace的其他问题可能是由于此一般问题引起的.

I suspect may other issues with Android monospace are due to this general issue.

这篇关于Android等宽空格(& nbsp;)宽度与字符宽度不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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