changeset 97538:1a792d38ec5a

(font_add_log): Add the font properties :script, :lang, and :otf in the log.
author Kenichi Handa <handa@m17n.org>
date Mon, 18 Aug 2008 12:05:30 +0000
parents 1e0f10eba754
children cc7d396b5612
files src/font.c
diffstat 1 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Mon Aug 18 12:04:35 2008 +0000
+++ b/src/font.c	Mon Aug 18 12:05:30 2008 +0000
@@ -4928,7 +4928,28 @@
   if (EQ (Vfont_log, Qt))
     return;
   if (FONTP (arg))
-    arg = Ffont_xlfd_name (arg, Qt);
+    {
+      Lisp_Object tail, elt;
+      Lisp_Object equalstr = build_string ("=");
+
+      val = Ffont_xlfd_name (arg, Qt);
+      for (tail = AREF (arg, FONT_EXTRA_INDEX); CONSP (tail);
+	   tail = XCDR (tail))
+	{
+	  elt = XCAR (tail);
+	  if (EQ (XCAR (elt), QCscript))
+	    val = concat3 (val, SYMBOL_NAME (QCscript),
+			   concat2 (equalstr, SYMBOL_NAME (XCDR (elt))));
+	  else if (EQ (XCAR (elt), QClang))
+	    val = concat3 (val, SYMBOL_NAME (QClang),
+			   concat2 (equalstr, SYMBOL_NAME (XCDR (elt))));
+	  else if (EQ (XCAR (elt), QCotf) && CONSP (XCDR (elt)))
+	    val = concat3 (val, SYMBOL_NAME (QCotf),
+			   concat2 (equalstr,
+				    SYMBOL_NAME (XCAR (XCDR (elt)))));
+	}
+      arg = val;
+    }
   if (FONTP (result))
     {
       val = Ffont_xlfd_name (result, Qt);