Mercurial > hg > xemacs-beta
comparison lisp/cus-face.el @ 707:a307f9a2021d
[xemacs-hg @ 2001-12-20 05:49:28 by andyp]
sync with 21-4-6-windows
author | andyp |
---|---|
date | Thu, 20 Dec 2001 05:49:48 +0000 |
parents | 576fb035e263 |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
706:c9bf82d465b5 | 707:a307f9a2021d |
---|---|
198 (let ((image (apply 'specifier-instance | 198 (let ((image (apply 'specifier-instance |
199 (face-background-pixmap face) args))) | 199 (face-background-pixmap face) args))) |
200 (and image | 200 (and image |
201 (image-instance-file-name image)))) | 201 (image-instance-file-name image)))) |
202 | 202 |
203 ;; This consistently fails to dtrt | |
204 ;;(defun custom-set-face-font-size (face size &optional locale tags) | |
205 ;; "Set the font of FACE to SIZE." | |
206 ;; ;; #### should this call have tags in it? | |
207 ;; (let* ((font (apply 'face-font-name face (list locale))) | |
208 ;; ;; Gag | |
209 ;; (fontobj (font-create-object font))) | |
210 ;; (set-font-size fontobj size) | |
211 ;; (apply 'font-set-face-font face fontobj locale tags))) | |
212 | |
213 ;; From Jan Vroonhof -- see faces.el | |
203 (defun custom-set-face-font-size (face size &optional locale tags) | 214 (defun custom-set-face-font-size (face size &optional locale tags) |
204 "Set the font of FACE to SIZE." | 215 "Set the font of FACE to SIZE." |
205 (let* ((font (apply 'face-font-name face locale)) | 216 (make-face-size face size locale tags)) |
206 ;; Gag | |
207 (fontobj (font-create-object font))) | |
208 (set-font-size fontobj size) | |
209 (apply 'font-set-face-font face fontobj locale tags))) | |
210 | 217 |
211 (defun custom-face-font-size (face &rest args) | 218 (defun custom-face-font-size (face &rest args) |
212 "Return the size of the font of FACE as a string." | 219 "Return the size of the font of FACE as a string." |
213 (let* ((font (apply 'face-font-name face args)) | 220 (let* ((font (apply 'face-font-name face args)) |
214 ;; Gag | 221 ;; Gag |
215 (fontobj (font-create-object font))) | 222 (fontobj (font-create-object font))) |
216 (format "%s" (font-size fontobj)))) | 223 (format "%s" (font-size fontobj)))) |
217 | 224 |
225 ;; Jan suggests this may not dtrt | |
226 ;;(defun custom-set-face-font-family (face family &optional locale tags) | |
227 ;; "Set the font of FACE to FAMILY." | |
228 ;; ;; #### should this call have tags in it? | |
229 ;; (let* ((font (apply 'face-font-name face (list locale))) | |
230 ;; ;; Gag | |
231 ;; (fontobj (font-create-object font))) | |
232 ;; (set-font-family fontobj family) | |
233 ;; (apply 'font-set-face-font face fontobj locale tags))) | |
234 | |
235 ;; From Jan Vroonhof -- see faces.el | |
218 (defun custom-set-face-font-family (face family &optional locale tags) | 236 (defun custom-set-face-font-family (face family &optional locale tags) |
219 "Set the font of FACE to FAMILY." | 237 "Set the font of FACE to FAMILY." |
220 (let* ((font (apply 'face-font-name face locale)) | 238 (make-face-family face family locale tags)) |
221 ;; Gag | |
222 (fontobj (font-create-object font))) | |
223 (set-font-family fontobj family) | |
224 (apply 'font-set-face-font face fontobj locale tags))) | |
225 | 239 |
226 (defun custom-face-font-family (face &rest args) | 240 (defun custom-face-font-family (face &rest args) |
227 "Return the name of the font family of FACE." | 241 "Return the name of the font family of FACE." |
228 (let* ((font (apply 'face-font-name face args)) | 242 (let* ((font (apply 'face-font-name face args)) |
229 ;; Gag | 243 ;; Gag |