blob: b3e1fe31584bdab764c6574e85210a3cef2525ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
;;; pg-fontsets.el --- Define fontsets useful for Proof General
;;
;; Copyright (C) 2008 David Aspinall / LFCS Edinburgh
;; Author: David Aspinall <David.Aspinall@ed.ac.uk>
;; License: GPL (GNU GENERAL PUBLIC LICENSE)
;;
;; $Id$
;;
;;; Commentary:
;;
;; Define some fontsets to try to select fonts that display many symbols.
;;
;; Select one of these fontsets via the menu Options -> Set Font/Fontset
;; or, with M-x set-default-font
;;
;; Recommended & free fonts to install on your system are:
;;
;; DejaVu LGC (Sans and Sans Mono). See http://dejavu.sourceforge.net
;; - missing Uplus, smile, frown, join
;;
;; TODO:
;; -- make a fontset which combines symbol characters from a
;; symbol-rich font
;;
;;; Code:
(defcustom pg-fontsets-default-fontset nil
"*Name of default fontset to use with Proof General."
:type 'string
:group 'proof-user-options)
(defun pg-fontsets-make-fontsetsizes (basefont)
(dolist (size '(10 12 14 18 22))
(add-to-list 'pg-fontsets-names
(create-fontset-from-fontset-spec
(replace-regexp-in-string
"%T" (car (split-string basefont))
(replace-regexp-in-string
"%S" (int-to-string size)
(replace-regexp-in-string
"%F" basefont
"-*-%F-*-*-*--%S-*-*-*-*-*-fontset-PG%T,
gnu-unifont:-*-%F-*-*-*--%S-*-*-*-*-*-iso10646-1"
;ascii:-*-%F-medium-r-normal--%S-*-*-*-*-*-mac-roman,
;latin-iso8859-1:-*-%F-medium-r-normal--%S-*-*-*-*-*-mac-roman,
;mule-unicode-0100-24ff:-*-%F-medium-r-normal--%S--*-*-*-*-*-iso10646-1,
;mule-unicode-2500-33ff:-*-%F-medium-r-normal--%S--*-*-*-*-*-iso10646-1,
;mule-unicode-e000-ffff:-*-%F-medium-r-normal--%S--*-*-*-*-*-iso10646-1"
)))))))
(defconst pg-fontsets-base-fonts
'("dejavu lgc sans mono"
"liberation mono"
"stixregular"))
(defun pg-fontsets-make-fontsets ()
(setq pg-fontsets-names nil)
(mapcar 'pg-fontsets-make-fontsetsizes
pg-fontsets-base-fonts))
; (custom-initialize-default 'pg-fontsets-default-fontset
; (nth 2 pg-fontsets-names))
; (setq pg-fontsets-default-fontset (nth 2 pg-fontsets-names))
; (set-default-font pg-fontsets-default-fontset))
(pg-fontsets-make-fontsets)
(provide 'pg-fontsets)
;;; pg-fontsets.el ends here
|