diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2009-12-01 23:49:05 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2009-12-01 23:49:05 +0000 |
commit | 973fb6af06b904bdaf2cbc870c4393d9b3d88860 (patch) | |
tree | b82cbdd30cffbb4a47a97ca963a7505a8ab1ded8 /lib/unicode-tokens.el | |
parent | eaa9c3e99e9d76ab2961f006cad3b7d2517e435c (diff) |
Diffstat (limited to 'lib/unicode-tokens.el')
-rw-r--r-- | lib/unicode-tokens.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el index bd6514ca..15c79fda 100644 --- a/lib/unicode-tokens.el +++ b/lib/unicode-tokens.el @@ -259,11 +259,12 @@ This is used for an approximate reverse mapping, see `unicode-tokens-paste'.") ;; (defconst unicode-tokens-font-family-alternatives '(("STIXGeneral" + "Lucida Grande" "Lucida Sans Unicode" "DejaVu Sans Mono" "DejaVuLGC Sans Mono") ("Script" "Lucida Calligraphy" "URW Chancery L" "Zapf Chancery") ("Fraktur" - "Lucida Blackletter" "URW Bookman L"))) + "Lucida Blackletter" "URW Bookman L Light"))) (if (boundp 'face-font-family-alternatives) (custom-set-default @@ -1182,15 +1183,17 @@ Commands available are: "A subroutine of `unicode-tokens-set-font-var'." (let (spec) (when font - ;; da: with x-select-font/fontconfig, best behaviour I get is - ;; to pass back in as family attribute only, not :font. - (set-face-attribute fontvar (selected-frame) - :width 'normal - ;; da: don't try to reset these for token fonts. - ;; :weight 'normal - ;; :slant 'normal - ;; da: sometimes :font doesn't work but :family does! - :font font) + ;; sometimes (on Linux/xft) :font doesn't work but :family does. + (condition-case nil + (set-face-attribute fontvar (selected-frame) + ;; da: don't try to reset these for token fonts. + ;; :weight 'normal :slant 'normal + :width 'normal + :font font) + (error + (set-face-attribute fontvar (selected-frame) + :width 'normal + :family font))) (let ((font-object (face-attribute fontvar :font))) (dolist (f (frame-list)) (and (not (eq f (selected-frame))) |