xterm 无法加载字体“-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1”

xterm 无法加载字体“-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1”

我在 RHEL 7.2 上使用 xterm 时遇到以下错误:

xterm:无法加载字体-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1

答案1

使用 Redhat7(或 CentOS7),您只需要两个 xterm 的位图字体包。一包(xorg-x11-fonts-misc)涵盖了除菜单特殊情况之外的所有内容。其他系统将使用不同的包名称(并以不同的方式划分字体)。

这是脚本中的列表(find-xterm-fonts)我写的用于检查是否安装了 xterm 所需的字体:

# opening /usr/share/X11/app-defaults/XTerm
    *SimpleMenu*menuLabel.font: -adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*
    *VT100.font1:       nil2
    *VT100.font2:       5x7
    *VT100.font3:       6x10
    *VT100.font4:       7x13
    *VT100.font5:       9x15
    *VT100.font6:       10x20
    *VT100.utf8Fonts.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
    *VT100.utf8Fonts.font:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
    *VT100.utf8Fonts.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
    *VT100.utf8Fonts.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
    *VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
    *VT100.utf8Fonts.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
    *tek4014*font2: 8x13
    *tek4014*font3: 6x13
# opening /usr/share/X11/app-defaults/UXTerm
    *VT100.font2:   -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
    *VT100.font:    -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
    *VT100.font3:   -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
    *VT100.font4:   -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
    *VT100.font5:   -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
    *VT100.font6:   -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
# opening /usr/share/X11/app-defaults/KOI8RXTerm
    *VT100.font:    -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-koi8-r
    *VT100.font2:   -misc-fixed-medium-r-normal--8-80-75-75-c-50-koi8-r
    *VT100.font3:   -misc-fixed-medium-r-normal--14-130-75-75-c-70-koi8-r
    *VT100.font4:   -misc-fixed-medium-r-normal--13-120-75-75-c-80-koi8-r
    *VT100.font5:   -misc-fixed-medium-r-normal--18-120-100-100-c-90-koi8-r
    *VT100.font6:   -misc-fixed-medium-r-normal--20-200-75-75-c-100-koi8-r

Font-files used:
    /usr/share/X11/fonts/100dpi/helvB12-ISO8859-15.pcf.gz
    -> XTerm*SimpleMenu*menuLabel.font
    /usr/share/X11/fonts/misc/10x20-ISO8859-1.pcf.gz
    -> XTerm*VT100.font6
    /usr/share/X11/fonts/misc/10x20-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font6
    /usr/share/X11/fonts/misc/10x20.pcf.gz
    -> UXTerm*VT100.font6
    -> XTerm*VT100.utf8Fonts.font6
    /usr/share/X11/fonts/misc/5x7-ISO8859-1.pcf.gz
    -> XTerm*VT100.font2
    /usr/share/X11/fonts/misc/5x8-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font2
    /usr/share/X11/fonts/misc/5x8.pcf.gz
    -> UXTerm*VT100.font2
    -> XTerm*VT100.utf8Fonts.font2
    /usr/share/X11/fonts/misc/6x10-ISO8859-1.pcf.gz
    -> XTerm*VT100.font3
    /usr/share/X11/fonts/misc/6x13-ISO8859-1.pcf.gz
    -> XTerm*tek4014*font3
    /usr/share/X11/fonts/misc/6x13-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font
    /usr/share/X11/fonts/misc/6x13.pcf.gz
    -> UXTerm*VT100.font
    -> XTerm*VT100.utf8Fonts.font
    /usr/share/X11/fonts/misc/7x13-ISO8859-1.pcf.gz
    -> XTerm*VT100.font4
    /usr/share/X11/fonts/misc/7x14-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font3
    /usr/share/X11/fonts/misc/7x14.pcf.gz
    -> UXTerm*VT100.font3
    -> XTerm*VT100.utf8Fonts.font3
    /usr/share/X11/fonts/misc/8x13-ISO8859-1.pcf.gz
    -> XTerm*tek4014*font2
    /usr/share/X11/fonts/misc/8x13-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font4
    /usr/share/X11/fonts/misc/8x13.pcf.gz
    -> UXTerm*VT100.font4
    -> XTerm*VT100.utf8Fonts.font4
    /usr/share/X11/fonts/misc/9x15-ISO8859-1.pcf.gz
    -> XTerm*VT100.font5
    /usr/share/X11/fonts/misc/9x18-KOI8-R.pcf.gz
    -> KOI8RXTerm*VT100.font5
    /usr/share/X11/fonts/misc/9x18.pcf.gz
    -> UXTerm*VT100.font5
    -> XTerm*VT100.utf8Fonts.font5
    /usr/share/X11/fonts/misc/nil2.pcf.gz
    -> XTerm*VT100.font1

No font-files missing

Packages providing font-files:

xorg-x11-fonts-ISO8859-15-100dpi-7.5-9.el7.noarch
    /usr/share/X11/fonts/100dpi/helvB12-ISO8859-15.pcf.gz
xorg-x11-fonts-misc-7.5-9.el7.noarch
    /usr/share/X11/fonts/misc/10x20-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/10x20-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/10x20.pcf.gz
    /usr/share/X11/fonts/misc/5x7-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/5x8-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/5x8.pcf.gz
    /usr/share/X11/fonts/misc/6x10-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/6x13-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/6x13-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/6x13.pcf.gz
    /usr/share/X11/fonts/misc/7x13-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/7x14-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/7x14.pcf.gz
    /usr/share/X11/fonts/misc/8x13-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/8x13-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/8x13.pcf.gz
    /usr/share/X11/fonts/misc/9x15-ISO8859-1.pcf.gz
    /usr/share/X11/fonts/misc/9x18-KOI8-R.pcf.gz
    /usr/share/X11/fonts/misc/9x18.pcf.gz
    /usr/share/X11/fonts/misc/nil2.pcf.gz

答案2

我查找丢失的字体,发现 xorg-x11-fonts 丢失了。所以我尝试通过下面的 yum 命令安装缺少的字体

# yum install xorg-x11-fonts*

并安装了以下字体:

# rpm -qa | grep -i xorg-x11-fonts
  • xorg-x11-fonts-75dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859-14-75dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859-15-75dpi-7.5-9。 el7.noarch
    xorg-x11-fonts-西里尔文-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859-9-100dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859-2-100dpi-7.5 -9.el7.noarch
    xorg-x11-fonts-ISO8859-1-75dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859-14-100dpi-7.5-9.el7.noarch
    xorg-x11-fonts- ISO8859-1-100dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ethiopic-7.5-9.el7.noarch
    xorg-x11-fonts-100dpi-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859 -2-75dpi-7.5-9.el7.noarch
    xorg-x11-fonts-misc-7.5-9.el7.noarch
    xorg-x11-fonts-Type1-7.5-9.el7.noarch
    xorg-x11-fonts-ISO8859- 9-75dpi-7.5-9.el7.noarch

完成此操作后,xterm 对我来说工作得很好。

答案3

导致此错误的另一个可能原因(由 @ThomasDickey 提供):“位图字体由(可能是远程)X 服务器处理,与 TrueType 字体(在客户端完成)不同。”

这是我的问题。我在远程服务器(在 Amazon EC2 上)上运行 xterm,并使用 Xming 作为 X 服务器,通过 Putty 将 X 显示返回到我的本地 Windows 机器。 Xming 没有安装错误的字体。所以它不是xterm找不到字体,这是我本地的 X 服务器,Xming。

我下载并安装了 xming-fonts (来自https://sourceforge.net/projects/xming/files/Xming-fonts/7.7.0.10/Xming-fonts-7-7-0-10-setup.exe/download)在我的本地节点上并修复了错误。

相关内容