>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)xemacs.org> writes:
Hrvoje> Here's a simple question: how do I find whether a face is
Hrvoje> bold? How about italic?
Hrvoje> Under X11, I can examine (font-instance-properties
Hrvoje> (face-font-instance face)). Then, if the property
Hrvoje> `WEIGHT_NAME' equals "Bold", the face is probably bold.
Hrvoje> If 'SLANT equals "i" or "o", the face is for my
purposes
Hrvoje> italic.
Hrvoje> I have a strange feeling that this doesn't work on non-X11
Hrvoje> devices. It might even failed under X11-based devices
Hrvoje> that provide their own font model (Qt?), under the
Hrvoje> condition that XEmacs actually uses it. So my question
Hrvoje> is: what does `font-instance-properties' return under
Hrvoje> Windows? If the answer is "nothing" or "nothing
useful",
Hrvoje> is there another way to detect boldness etc.?
Hi Hrvoje, I get this in
(emacs-version)
"XEmacs 21.4 (patch 14) \"Reasonable Discussion\" [Lucid] (i586-pc-win32)
of Sun Sep 14 2003 on D5DC120J"
(face-font-instance 'gnus-header-subject-face)
#<font-instance "Courier New:Bold:10::Western" on #<mswindows-device
0x5ea> 0xde0a0db3 0x1b8f>
(font-instance-properties (face-font-instance 'gnus-header-subject-face))
nil
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/