Emacs在Exceed / Linux上的9x15字体 [英] Emacs 9x15 fonts on Exceed/Linux

查看:146
本文介绍了Emacs在Exceed / Linux上的9x15字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯了emacs中的9x15字体,但是由于我在Exceed服务器中切换到了100dpi的设置,所以我无法加载它们。 emacs字体菜单只提供解放,Sans,Monospace和Serif以供选择,但不需要我需要的固定尺寸字体。

I'm used to 9x15 fonts in emacs, but since I switched to a 100dpi settings in my Exceed server I'm unable to load them. The emacs fonts menu only offers Liberation, Sans, Monospace and Serif for selection, but not the fixed size fonts I need.

xterm可以正常工作。我可以用任意固定大小的字体运行它,例如:'xterm -fn 9x13'。如果我尝试使用与emacs相同的命令,它会出现另一种字体。这是emacs describe-font命令的输出:

xterm works fine. I can run it with any fixed size fonts I want, for example: 'xterm -fn 9x13'. If I try the same command with emacs, it comes up with another font. This is the output from the emacs describe-font command:


名称(打开方式):-unknown-Liberation
Sans-正常 - 正常 - -17 - -75-75 - * - 0-iso10646-1
全名:解放Sans:pixelsize = 17:foundry = unknown:weight = normal: slant = normal:width = normal:dpi = 75:scalable = true
size:17
height:20 baseline-offset:0 relative-compose:0

name (opened by): -unknown-Liberation Sans-normal-normal-normal--17--75-75-*-0-iso10646-1 full name: Liberation Sans:pixelsize=17:foundry=unknown:weight=normal:slant=normal:width=normal:dpi=75:scalable=true size: 17 height: 20 baseline-offset: 0 relative-compose: 0

我的配置是:

超出Windows XServer版本14,窗口管理器在Windows上运行。 Emacs在Linux 2.6.32(Red Hat)上运行

Exceed Windows XServer version 14, window manager running on Windows. Emacs running on Linux 2.6.32 (Red Hat)

如何强制emacs使用9x15字体?

How can I force emacs to use 9x15 fonts?

推荐答案

我通过手动编辑.emacs custom-set-faces来解决问题:

I solved the problem by manually editing .emacs custom-set-faces:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(blink-cursor-mode nil)
 '(default-frame-alist (quote ((menu-bar-lines . 1) (vertical-scroll-bars . right) (tool-bar-lines . 0))))
 '(scroll-bar-mode (quote right))
 '(show-paren-mode t)
 '(tool-bar-mode nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "#f0f0f0" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :style "Regular" :slant normal :weight normal :width normal :foundry "misc" :family "fixed" :height 130)))))

Emacs似乎使用fc-list约定来选择字体。但是,shift-B1菜单仅显示本机上可用的字体,而不是 X服务器上可用的字体。这种不匹配可能是问题开始的地方。在我的情况下,从emacs菜单中选择默认字体并没有改变我的.emacs设置。

Emacs seems to use the fc-list convention to select the fonts. However the shift-B1 menu only displays fonts available on the local machine, not those available on the X server. This mismatch could be where the problem starts. In my case choosing the default font from the emacs menu didn't actually change my .emacs settings.

此外,我还试图在.emacs代码中设置像素大小来更改字体大小,但唯一的fc-list参数是高度。当然,每个高度值会在75dpi和100dpi的服务器设置上看起来不同。

Also I tried to set pixelsize in the .emacs code to change the font size, but the only fc-list parameter that worked was height. Of course, each height value will look different on 75dpi and 100dpi server settings.

这篇关于Emacs在Exceed / Linux上的9x15字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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