磁盘上的unicode字符在哪里,映射过程是什么? [英] Where are the unicode characters on the disk and what's the mapping process?

查看:114
本文介绍了磁盘上的unicode字符在哪里,映射过程是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,有几个与Unicode有关的问题使我感到困惑。

There are several unicode relevant questions has been confusing me for some time.

由于这些原因,我认为磁盘上存在Unicode字符。

For these reasons as follow I think the unicode characters are existed on disk.


  1. 在终端中执行 echo \u6211 ,它将打印字形对应于Unicode代码点U + 6211。

  2. 有一个UCD(统一字符数据库)的概念,我们可以下载它的最新版本。 UCD最新

  3. 某些新版本的unicode在升级macOS版本之前,最新的emoji表情符之类的字符无法显示在我的mac上。

  1. Execute echo "\u6211" in terminal, it will print the glyph corresponding to the unicode code point U+6211.
  2. There's a concept of UCD (unicode character database), and We can download it's latest version. UCD latest
  3. Some new version unicode characters like latest emojis can not display on my mac until I upgrade macOS version.

因此,如果磁盘上确实存在Unicode字符,然后:

So if the unicode characters does existed on the disk , then :


  1. 在哪里?

  2. 如何升级?

  3. 将unicode代码点映射到字形的过程是什么?

  4. 如果我使用特定字体,那么将unicode代码点映射到字形的过程是什么?

  1. Where is it ?
  2. How can I upgrade it ?
  3. What's the process of mapping the unicode code point to a glyph ?
  4. If I use a specific font, then what's the process of mapping the unicode code point to a glyph ?

如果没有,那么将Unicode代码点映射到字形的过程是什么?

If not, then what's the process of mapping the unicode code point to a glyph ?

如果有人可以阐明这些问题,将不胜感激。

It will very appreciated if someone could shed light on these problems.

推荐答案


在终端中执行 echo \u6211 ,它将打印与Unicode代码点U + 6211相对应的字形。

Execute echo "\u6211" in terminal, it will print the glyph corresponding to the unicode code point U+6211.

bash中的 echo -e

› echo "\u6211"
\u6211
› echo -e "\u6211"
我




它在哪里?

Where is it ?

在字体文件中。


某些新版本的Unicode字符(如最新的表情符号)无法显示在我的mac,直到我升级macOS版本。
我如何升级它?

Some new version unicode characters like latest emojis can not display on my mac until I upgrade macOS version. How can I upgrade it ?

使用表情符号安装/升级合适的字体就足够了。我没有macOS,所以无法验证这一点。

Installing/upgrading a suitable font with the emojis should be enough. I don't have macOS, so I cannot verify this.

我使用的是 Noto Color Emoji版本2.011 / 20180424,效果很好。

I use "Noto Color Emoji" version 2.011/20180424, it works fine.


将Unicode代码点映射到字形的过程是什么?

What's the process of mapping the unicode code point to a glyph ?

应用程序(例如文本编辑器)为字体渲染子系统(macOS上为Quartz?)提供Unicode文本和字体名称。字体渲染器分析文本的代码点并确定它是简单文本(例如拉丁文,中文,独立表情符号)还是复杂文本(例如带有多个标记的拉丁文,泰文,阿拉伯文,零宽度连接符的表情符号)。渲染器在字体文件中找到相应的轮廓。如果文件没有所需的字形,则渲染器可以使用类似的字体,或使用配置为后备字体的替代品(白框,黑色问号等)。然后,轮廓将进行整形以构成复杂的标志符号和换行符。最后,字体渲染器将结果传递给显示系统。

The application (e.g. text editor) provides the font rendering subsystem (Quartz? on macOS) with Unicode text and a font name. The font renderer analyses the codepoints of the text and decides whether this is simple text (e.g. Latin, Chinese, stand-alone emojis) or complex text (e.g. Latin with many marks, Thai, Arabic, emojis with zero-width joiners). The renderer finds the corresponding outlines in the font file. If the file does not have the required glyph, the renderer may use a similar font, or use a configured fallback font for a poor substitute (white box, black question mark etc.). Then the outlines undergo shaping to compose a complex glyph and line-breaking. Finally, the font renderer hands off the result to the display system.

除整形外,几乎与Unicode或编码无关。字体渲染在Unicode出现之前就已经可以正常工作了,当然字体文件和渲染在30年前要简单得多。编码仅在有人要从应用程序加载或保存文本时才重要。

Apart from the shaping, very little of this has to do with Unicode or encoding. Font rendering already used to work that way before Unicode existed, of course font files and rendering was much simpler 30 years ago. Encoding only matters when someone wants to load or save text from an application.

摘要:调查


  • Truetype / Opentype字体编辑软件,以便您可以查看文件中包含的内容

  • 字体渲染器,在Linux上查看库pango和freetype。

这篇关于磁盘上的unicode字符在哪里,映射过程是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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