2013-04-30 33 views
0

我已經習慣了emacs中的9x15字體,但是由於我在Exceed服務器上切換到100dpi設置,我無法加載它們。 emacs字體菜單隻提供Liberation,Sans,Monospace和Serif供選擇,但不是我需要的固定大小的字體。Exceed/Linux上的Emacs 9x15字體

xterm工作正常。我可以用我想要的任何固定大小的字體運行它,例如:'xterm -fn 9x13'。如果我使用emacs嘗試相同的命令,則會出現另一種字體。這是從emacs的輸出描述的字體的命令:

名(開啓):-Unknown-解放 三世正常正常-正 - -17- -75-75 - * - 0 -iso10646-1 全稱:Liberation Sans:pixelsize = 17:foundry = unknown:weight = normal:slant = normal:width = normal:dpi = 75:scalable = true size:17 height:20 baseline-offset: 0相對撰寫:0

我的配置是:

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

如何強制emacs使用9x15字體?

回答

0

我通過手動編輯的.emacs自定義設置的面孔解決了這個問題:

(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代碼中設置像素大小來改變字體大小,但是唯一工作的fc-list參數是高度。當然,每個高度值在75dpi和100dpi服務器設置上看起來都不一樣。