From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: emacs-devel@gnu.org
Subject: set-face-attribute and floating point :height values
Date: Mon, 31 Jan 2011 12:33:49 -0800 [thread overview]
Message-ID: <xeiabp2wq0cy.fsf@kobe.laptop> (raw)
My ~/.emacs file now includes the following to fine-tune the default
face for X11 frames:
(when (display-graphic-p)
(set-face-attribute 'default nil :family "DejaVu Sans Mono" :width 'ultra-condensed :height 102)
(require 'color-theme))
The documentation of `set-face-attribute' mentions that :height is
supposed to accept floating point values too:
,----[ C-h f set-face-attribute ]---------------------------------------
| set-face-attribute is a compiled Lisp function in `faces.el'.
|
| (set-face-attribute FACE FRAME &rest ARGS)
|
| Set attributes of FACE on FRAME from ARGS.
| [...]
|
| `:height'
|
| VALUE must be either an integer specifying the height of the font to use
| in 1/10 pt, a floating point number specifying the amount by which to
| scale any underlying face, or a function, which is called with the old
| height (from the underlying face), and should return the new height.
| [...]
`-----------------------------------------------------------------------
But trying to use a floating-point number in my ~/.emacs file throws up
an error, e.g. when I evaluate in my *scratch* buffer the expression:
(set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 1.4)
a debugger pops up with the following backtrace:
Debugger entered--Lisp error: (error "Invalid default face height" 1.4)
internal-set-lisp-face-attribute(default :height 1.4 0)
set-face-attribute(default nil :family "DejaVu Sans Mono" :width
ultra-condensed :height 1.4)
eval((set-face-attribute (quote default) nil :family "DejaVu Sans
Mono" :width (quote ultra-condensed) :height 1.4))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
Is the documentation of `set-face-attribute' out of date, or am I using
it incorrectly?
next reply other threads:[~2011-01-31 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 20:33 Giorgos Keramidas [this message]
2011-01-31 20:42 ` set-face-attribute and floating point :height values Glenn Morris
2011-01-31 20:46 ` Giorgos Keramidas
2011-01-31 22:04 ` Drew Adams
2011-02-01 3:09 ` Giorgos Keramidas
2011-02-01 3:56 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xeiabp2wq0cy.fsf@kobe.laptop \
--to=keramida@ceid.upatras.gr \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.