为什么上标数字的 Unicode 字符显示高度不一样?
为什么 Unicode 数字上标的显示高度不一样?如果您用上标数字组成两位数,这一点尤其明显。其中一些看起来不错,但其余的看起来彼此格格不入。我错过了什么吗?或者事实就是如此?
Why the display of Unicodes for superscripts of digits are not at the same height? This is specially noticeable if you make two digit numbers out of the superscript digits. Some of them look fine but the rest look out of the place with respect to each other. Am I missing something? Or is this how it is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
就像jrturton 提到,1、2 和 3 来自旧字符集(拉丁语 1),因此包含在不同的位置。这也意味着很多字体不支持更多的上标数字,因为许多字体只支持拉丁文、希腊文和西里尔文,并添加一些标点符号。因此,其余的字体取自不同的字体,您可以使用该字体作者几乎没有控制权。
例如:
这些是从 1 到 9 和 0 的上标数字。文本的运行格式为 Arial在Word中。你看看其他人发生了什么。与 jrturton 认为的相反,没有对现有字形进行重塑。这只是字体替换。
Like jrturton mentions, ¹, ² and ³ were from a legacy character set (Latin 1) and therefore included in a different place. This also means that lots of fonts don't have support for more superscript numbers, as many only strive for Latin, Greek and Cyrillic with a few punctuation symbols thrown in. So the remaining ones are taken from a different font over which you as an author have little to no control.
As an example:
Those are the superscript numerals from 1 to 9 and 0. The run of text was formatted in Arial in Word. You see what happened to the rest of them. Contrary to what jrturton believes, there is no reshaping of existing glyphs involved. This is just font substitution.
不合适的(1,2 和 3)是在其余的之前添加的(请参阅维基百科:http:// en.wikipedia.org/wiki/Unicode_superscripts_and_subscripts),并且来自不同的 unicode 块。这并不能解释为什么它们看起来不同,但可能这些字符是大多数字体中的实际字符,而其余字符只是标准字形的调整版本。
看起来就是这样,你是对的,当你试图制作多位上标数字时,它看起来可怕。我不知道它是否适用于所有字体,但它在 iOS 系统字体上非常明显。
如果有人有办法让这项工作成功,我会在这个问题上悬赏。
更新
我编写了一个小程序来循环浏览手机上的所有字体并显示从 0 到 9 的上标数字。以下字体在所有数字上具有一致的外观:
The out of place ones (1,2 and 3) were added before the rest (see wikipedia: http://en.wikipedia.org/wiki/Unicode_superscripts_and_subscripts), and are from a different unicode block. That doesn't explain why they look different but it may be that those ones are actual characters in most fonts, and the remaining ones are just adjusted versions of the standard glyphs.
This appears to be how it is and you are right, it looks terrible when you are trying to make multi digit superscript numbers. I don't know if it applies to all fonts but it is very noticeable on the iOS system font.
If anyone has a way to make this work, I will put a bounty up on this question.
UPDATE
I knocked up a little program to cycle through all fonts on the phone and display the superscript numerals from 0 to 9. The following fonts had a consistent appearance across all digits:
只是为了添加更多数据,在某些情况下,即使字体中有明确的字形,它们也会被放置在错误的高度。 (我怀疑这是为了向后兼容,但我不知道历史。)
以下是 Helvetica Neue 在 macOS 13.2.1 上使用的字形:
设计和尺寸匹配,但垂直偏移不同。
Just to add more data to this, in some cases even when there are explicit glyphs in the font, they are put at the wrong height. (My suspicion is that this is for backward compatibility, but I don't know the history.)
Here are the glyphs used by Helvetica Neue on macOS 13.2.1:
The design and size matches, but the vertical offsets are different.