Mercurial > hg > xemacs-beta
comparison lisp/w3/font.el @ 88:821dec489c24 r20-0
Import from CVS: tag r20-0
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:09:59 +0200 |
parents | 6a378aca36af |
children | 0d2f883870bc |
comparison
equal
deleted
inserted
replaced
87:7df2982f5c17 | 88:821dec489c24 |
---|---|
1 ;;; font.el --- New font model | 1 ;;; font.el --- New font model |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/01/22 19:31:17 | 3 ;; Created: 1997/01/30 00:58:33 |
4 ;; Version: 1.26 | 4 ;; Version: 1.29 |
5 ;; Keywords: faces | 5 ;; Keywords: faces |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
249 ;;; Utility functions | 249 ;;; Utility functions |
250 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 250 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
251 (defsubst set-font-style-by-keywords (fontobj styles) | 251 (defsubst set-font-style-by-keywords (fontobj styles) |
252 (make-local-variable 'font-func) | 252 (make-local-variable 'font-func) |
253 (declare (special font-func)) | 253 (declare (special font-func)) |
254 (while styles | 254 (if (listp styles) |
255 (setq font-func (car-safe (cdr-safe (assq (car styles) font-style-keywords))) | 255 (while styles |
256 styles (cdr styles)) | 256 (setq font-func (car-safe (cdr-safe (assq (car styles) font-style-keywords))) |
257 styles (cdr styles)) | |
258 (and (fboundp font-func) (funcall font-func fontobj t))) | |
259 (setq font-func (car-safe (cdr-safe (assq styles font-style-keywords)))) | |
257 (and (fboundp font-func) (funcall font-func fontobj t)))) | 260 (and (fboundp font-func) (funcall font-func fontobj t)))) |
258 | 261 |
259 (defsubst font-properties-from-style (fontobj) | 262 (defsubst font-properties-from-style (fontobj) |
260 (let ((style (font-style fontobj)) | 263 (let ((style (font-style fontobj)) |
261 (todo font-style-keywords) | 264 (todo font-style-keywords) |
570 (let ((family (or (font-family fontobj) | 573 (let ((family (or (font-family fontobj) |
571 (font-default-family-for-device device) | 574 (font-default-family-for-device device) |
572 (x-font-families-for-device device))) | 575 (x-font-families-for-device device))) |
573 (weight (or (font-weight fontobj) :medium)) | 576 (weight (or (font-weight fontobj) :medium)) |
574 (style (font-style fontobj)) | 577 (style (font-style fontobj)) |
575 (size (or (font-size fontobj) (font-default-size-for-device device))) | 578 (size (or (if font-running-xemacs |
579 (font-size fontobj)) | |
580 (font-default-size-for-device device))) | |
576 (registry (or (font-registry fontobj) "*")) | 581 (registry (or (font-registry fontobj) "*")) |
577 (encoding (or (font-encoding fontobj) "*"))) | 582 (encoding (or (font-encoding fontobj) "*"))) |
578 (if (stringp family) | 583 (if (stringp family) |
579 (setq family (list family))) | 584 (setq family (list family))) |
580 (setq weight (font-higher-weight weight | 585 (setq weight (font-higher-weight weight |