]> git.eshelyaron.com Git - emacs.git/commitdiff
* nsfont.m (ns_findfonts): Correctly return fallback in match case.
authorAdrian Robert <Adrian.B.Robert@gmail.com>
Fri, 24 Jul 2009 15:43:22 +0000 (15:43 +0000)
committerAdrian Robert <Adrian.B.Robert@gmail.com>
Fri, 24 Jul 2009 15:43:22 +0000 (15:43 +0000)
src/ChangeLog
src/nsfont.m

index 5ec38e71b7cc34c805e60bccb0a5d77210e85653..7814f8a637ee466e6a54d0e2201ca08791087f73 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-24  Adrian Robert  <Adrian.B.Robert@gmail.com>
+
+       * nsfont.m (ns_findfonts): Correctly return fallback in match case.
+
 2009-07-23  Yavor Doganov  <yavor@gnu.org>
 
        * nsfont.m (NSFontDescriptor.h): Explicitly include under GNUstep.
index 33bbe37ab65447693e0c4c5b96ba2449b93e9f4c..100676762a809d3b2a9be6b377afdd3e92ae4a0d 100644 (file)
@@ -464,7 +464,7 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
     /* If has non-unicode registry, give up. */
     tem = AREF (font_spec, FONT_REGISTRY_INDEX);
     if (! NILP (tem) && !EQ (tem, Qiso10646_1) && !EQ (tem, Qunicode_bmp))
-       return isMatch ? ns_fallback_entity () : Qnil;
+       return isMatch ? Fcons (ns_fallback_entity (), list) : Qnil;
 
     cFamilies = ns_get_covering_families (ns_get_req_script (font_spec), 0.90);
 
@@ -502,6 +502,10 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
                                         "synthItal"), list);
       }
 
+    /* Return something if was a match and nothing found. */
+    if (isMatch && XINT (Flength (list)) == 0)
+      list = Fcons (ns_fallback_entity (), Qnil);
+
     if (NSFONT_TRACE)
        fprintf (stderr, "    Returning %d entities.\n", XINT (Flength (list)));