Source

text-modes / rtf-support.el

Diff from to

File rtf-support.el

 	(mapc '(lambda (cur-face)
 		 ;; Extract font information
 		 (setq font (font-name (face-property cur-face 'font)))
-		 (setq font (split-string font ":"))
-		 (setq font (list (nth 0 font)
-				  (nth 1 font)
-				  (nth 3 font)
-				  (if (length (nth 2 font))
-				      (string-to-number (nth 2 font))
-				    10)))
+		 (let ((type (console-type)))
+		   (cond
+		    ((eq type 'x)
+		     (setq font (split-string font "-"))
+		     (setq font (list (nth 2 font)
+				      (nth 3 font)
+				      (nth 4 font)
+				      (cond
+				       ((eq (nth 8 font) "*") 10)
+				       ((> (length (nth 8 font)) 0)
+					(/ (string-to-number (nth 8 font)) 10))
+				       (t 10)))))
+		    (t
+		     (setq font (split-string font ":"))
+		     (setq font (list (nth 0 font)
+				      (nth 1 font)
+				      (nth 3 font)
+				      (if (> (length (nth 2 font)) 0)
+					  (string-to-number (nth 2 font))
+					10))))))
 		   
 		 ;; Make a new font if necessary
 		 (unless (assoc (nth 0 font) fonts)