libvte unicode字体处理

ali1234

我正在尝试显示一些ANSI文本,其中包含来自Unicode专用区域字符我有两种包含这些字符的字体。第一个是PCF(位图)字体,第二个是TTF字体,从第一个字体生成,并且包含完全相同的字形集。

PCF字体在Debian和Ubuntu中以“ tv-fonts”包提供,称为“ teletext”。TTF版本可在此处获得

通过将终端配置为使用我的一种字体,然后为该文件添加目录,可以显示此文本文件

这在不同的终端中产生不同的结果:

Xterm只能使用PCF字体。随着xterm -fg white -bg black -fn teletext我看到正确的输出:

xterm pcf

终结符可以同时使用PCF和TTF字体。使用PCF字体时,输出正确:

终结者pcf

但是,如果我告诉终结者使用TTF字体,则输出将在大的“ BBC”徽标之后包含意外字符:

终结者ttf

有问题的字符是,Unicode 0xee20。PCF和TTF字体均为空白。

当使用xfce4-terminal时,结果是相同的。终结器和Xfce4-terminal都使用libvte。

所以我的问题是:

  • 为什么libvte显示错误的字形?
  • 为什么它在TTF和PCF之间表现不同?(请记住,两种字体都包含一组相同的字形。)

Update: It seems that this isn't actually related to VTE but to Gtk, and possibly X11 itself. The same results can be seen when setting the font in a text editor, such as mousepad (which uses GtkSourceView.)

Thomas Dickey

Actually, xterm (and xfd) can use TrueType fonts, using the -fa option. With the latter, you can see that 0xee20 is missing from the font:

在此处输入图片说明

Given that, xterm would show a missing glyph (because it uses only one font). Likely vte is doing the same because none of the fallback fonts which it may be using has this particular private use code.

For comparison, here is a screenshot with xfd displaying the PCF font (which does have the glyph):

在此处输入图片说明

字体是否“相同”取决于它们的创建(和维护)方式。我在TrueType字体的屏幕截图中看到7个缺少的字形,而在PCF字体上没有一个。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章