emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106614: ftfont.c (get_adstyle_proper


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106614: ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil (Bug#8046, Bug#10193).
Date: Mon, 05 Dec 2011 16:49:21 +0900
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106614 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: trunk
timestamp: Mon 2011-12-05 16:49:21 +0900
message:
  ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil 
(Bug#8046, Bug#10193).
modified:
  src/ChangeLog
  src/ftfont.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-12-05 07:03:31 +0000
+++ b/src/ChangeLog     2011-12-05 07:48:29 +0000
@@ -1,5 +1,10 @@
 2011-12-05  Kenichi Handa  <address@hidden>
 
+       * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
+       return Qnil (Bug#8046, Bug#10193).
+
+2011-12-05  Kenichi Handa  <address@hidden>
+
        * coding.c (encode_designation_at_bol): New args charbuf_end and
        dst.  Return the number of produced bytes.  Callers changed.
        (coding_set_source): Return how many bytes coding->source was

=== modified file 'src/ftfont.c'
--- a/src/ftfont.c      2011-11-30 16:33:05 +0000
+++ b/src/ftfont.c      2011-12-05 07:48:29 +0000
@@ -164,6 +164,13 @@
   char *str, *end;
   Lisp_Object adstyle;
 
+#ifdef FC_FONTFORMAT
+  if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
+      && (xstrcasecmp ((char *) fcstr, "bdf") != 0
+         || xstrcasecmp ((char *) fcstr, "pcf") != 0))
+    /* Not a BDF nor PCF font.  */
+    return Qnil;
+#endif
   if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch)
     return Qnil;
   str = (char *) fcstr;


reply via email to

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