(defun list-monospace-truetype-fonts ()
"Provide a list of available monospaced truetype fonts on this
machine"
(interactive)
(set-buffer (get-buffer-create "Monospaced Fonts"))
(call-process-shell-command "fc-list :spacing=mono:scalable=true family | sort" nil t)
(setq buffer-read-only t)
(switch-to-buffer-other-window (current-buffer)))
You can set these fonts in a number of ways, currently I am getting the most joy using this form:
(defun safe-set-initial-font (fontstring)
"Set the default frame font"
(interactive "s")
(setq initial-frame-alist
`((font . ,fontstring)
(background-color . ,(face-background 'default))
(foreground-color . ,(face-foreground 'default))
(horizontal-scroll-bars . nil)
(vertical-scroll-bars . nil)
(menu-bar-lines . 0)
(height . 40)
(width . 80)
(cursor-color . "red")
(mouse-color . "green")))
(setq default-frame-alist (copy-alist initial-frame-alist)))
That's pretty nasty, but it gets round a bug where opening a new frame results in a different font being used.
1 comment:
Works nicely on Ubuntu Hardy Heron emacs-snapshot. Thanks!
Post a Comment