diff 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
line wrap: on
line diff
--- a/lisp/cus-face.el	Wed Dec 19 00:40:26 2001 +0000
+++ b/lisp/cus-face.el	Thu Dec 20 05:49:48 2001 +0000
@@ -200,13 +200,20 @@
     (and image
 	 (image-instance-file-name image))))
 
+;; This consistently fails to dtrt
+;;(defun custom-set-face-font-size (face size &optional locale tags)
+;;  "Set the font of FACE to SIZE."
+;;  ;; #### should this call have tags in it?
+;;  (let* ((font (apply 'face-font-name face (list locale)))
+;;	 ;; Gag
+;;	 (fontobj (font-create-object font)))
+;;    (set-font-size fontobj size)
+;;    (apply 'font-set-face-font face fontobj locale tags)))
+
+;; From Jan Vroonhof -- see faces.el
 (defun custom-set-face-font-size (face size &optional locale tags)
   "Set the font of FACE to SIZE."
-  (let* ((font (apply 'face-font-name face locale))
-	 ;; Gag
-	 (fontobj (font-create-object font)))
-    (set-font-size fontobj size)
-    (apply 'font-set-face-font face fontobj locale tags)))
+  (make-face-size face size locale tags))
 
 (defun custom-face-font-size (face &rest args)
   "Return the size of the font of FACE as a string."
@@ -215,13 +222,20 @@
 	 (fontobj (font-create-object font)))
     (format "%s" (font-size fontobj))))
 
+;; Jan suggests this may not dtrt
+;;(defun custom-set-face-font-family (face family &optional locale tags)
+;;  "Set the font of FACE to FAMILY."
+;;  ;; #### should this call have tags in it?
+;;  (let* ((font (apply 'face-font-name face (list locale)))
+;;	 ;; Gag
+;;	 (fontobj (font-create-object font)))
+;;    (set-font-family fontobj family)
+;;    (apply 'font-set-face-font face fontobj locale tags)))
+
+;; From Jan Vroonhof -- see faces.el
 (defun custom-set-face-font-family (face family &optional locale tags)
   "Set the font of FACE to FAMILY."
-  (let* ((font (apply 'face-font-name face locale))
-	 ;; Gag
-	 (fontobj (font-create-object font)))
-    (set-font-family fontobj family)
-    (apply 'font-set-face-font face fontobj locale tags)))
+  (make-face-family face family locale tags))
 
 (defun custom-face-font-family (face &rest args)
   "Return the name of the font family of FACE."