all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `font-face-attributes' sometimes returns bogus :height value
@ 2008-06-17  3:05 Miles Bader
  2008-06-17  4:55 ` Kenichi Handa
  0 siblings, 1 reply; 8+ messages in thread
From: Miles Bader @ 2008-06-17  3:05 UTC (permalink / raw)
  To: emacs-devel

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.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-20 23:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17  3:05 `font-face-attributes' sometimes returns bogus :height value Miles Bader
2008-06-17  4:55 ` Kenichi Handa
2008-06-17 14:11   ` Miles Bader
2008-06-17 14:37     ` Chong Yidong
2008-06-17 14:50   ` Chong Yidong
2008-06-17 21:13     ` Miles Bader
2008-06-18  0:30     ` Kenichi Handa
2008-06-20 23:23     ` Chong Yidong

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.