From 973fb6af06b904bdaf2cbc870c4393d9b3d88860 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Tue, 1 Dec 2009 23:49:05 +0000 Subject: Attempt at http://proofgeneral.inf.ed.ac.uk/trac/ticket/311 --- lib/unicode-tokens.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'lib') 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))) -- cgit v1.2.3