summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-05-14 01:39:58 +0000
committerKenichi Handa <handa@m17n.org>2008-05-14 01:39:58 +0000
commit7bae9f7206d9709a5016104616ea97eaf9f2f495 (patch)
tree5fe2de22b9f3a0423f5f826e6856948a7de68730 /src/print.c
parent270dd68800d18895da92ad9093e6da32ac71df6e (diff)
downloademacs-7bae9f7206d9709a5016104616ea97eaf9f2f495.tar.gz
Include font.h.
(print_object): Handle font-related objects.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index d5453ce74ef..82c987a85dd 100644
--- a/src/print.c
+++ b/src/print.c
@@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA. */
#include "intervals.h"
#include "blockinput.h"
#include "termhooks.h" /* For struct terminal. */
+#include "font.h"
Lisp_Object Vstandard_output, Qstandard_output;
@@ -2129,6 +2130,34 @@ print_object (obj, printcharfun, escapeflag)
strout (buf, -1, -1, printcharfun, 0);
PRINTCHAR ('>');
}
+ else if (FONTP (obj))
+ {
+ EMACS_INT i;
+
+ if (! FONT_OBJECT_P (obj))
+ {
+ if (FONT_SPEC_P (obj))
+ strout ("#<font-spec", -1, -1, printcharfun, 0);
+ else
+ strout ("#<font-entity", -1, -1, printcharfun, 0);
+ for (i = 0; i < FONT_SPEC_MAX; i++)
+ {
+ PRINTCHAR (' ');
+ if (i < FONT_WEIGHT_INDEX || i > FONT_WIDTH_INDEX)
+ print_object (AREF (obj, i), printcharfun, escapeflag);
+ else
+ print_object (font_style_symbolic (obj, i, 0),
+ printcharfun, escapeflag);
+ }
+ }
+ else
+ {
+ strout ("#<font-object ", -1, -1, printcharfun, 0);
+ print_object (AREF (obj, FONT_NAME_INDEX), printcharfun,
+ escapeflag);
+ }
+ PRINTCHAR ('>');
+ }
else
{
EMACS_INT size = XVECTOR (obj)->size;