emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`font-face-attributes' sometimes returns bogus :height value


From: Miles Bader
Subject: `font-face-attributes' sometimes returns bogus :height value
Date: Tue, 17 Jun 2008 12:05:20 +0900

If `font-face-attributes' is called without a specified height, it
returns an attribute list containing `:height nil', which is invalid.

E.g.

   (font-face-attributes "Dejavu Serif")
   => (:family "Dejavu Serif" :height nil :weight normal :slant normal :width 
normal)

Since it is quite useful to work with no specified, I think this case
should be supported properly.

To make this work means either omitting the :height attribute entirely
from the returned attribute-list, or alternatively, keeping it, but
using `:height unspecified' for the height.

I dunno what's the preferred way, but I would tentatively favor simply
omitting :height altogether, and making it clear in the function
documentation that the exact order/contents of the returned attribute
list is not guaranteed.

-Miles

-- 
Un-American, adj. Wicked, intolerable, heathenish.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]