aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdrian Robert2009-07-29 16:03:12 +0000
committerAdrian Robert2009-07-29 16:03:12 +0000
commit1586503c80301707f138c71208fac69c11274d02 (patch)
tree452461e2819c3eee75883ff5a94456be17d673f2 /src
parentd6a69b30c7edb5ab3bf8d73fd44dc798a53842cb (diff)
downloademacs-1586503c80301707f138c71208fac69c11274d02.tar.gz
emacs-1586503c80301707f138c71208fac69c11274d02.zip
* nsfont.m (ns_findfonts): Fix 2009-07-24 change to return only one element, not a list, for match case.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsfont.m13
2 files changed, 13 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 523f19ff0c0..989831d6763 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-07-29 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * nsfont.m (ns_findfonts): Fix 2009-07-24 change to return only one
4 element, not a list, for match case.
5
12009-07-28 Kenichi Handa <handa@m17n.org> 62009-07-28 Kenichi Handa <handa@m17n.org>
2 7
3 * font.c (font_parse_xlfd): Check DPI and AVGWIDTH properties more 8 * font.c (font_parse_xlfd): Check DPI and AVGWIDTH properties more
diff --git a/src/nsfont.m b/src/nsfont.m
index 89b42901f42..a4c4444069b 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -464,7 +464,7 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
464 /* If has non-unicode registry, give up. */ 464 /* If has non-unicode registry, give up. */
465 tem = AREF (font_spec, FONT_REGISTRY_INDEX); 465 tem = AREF (font_spec, FONT_REGISTRY_INDEX);
466 if (! NILP (tem) && !EQ (tem, Qiso10646_1) && !EQ (tem, Qunicode_bmp)) 466 if (! NILP (tem) && !EQ (tem, Qiso10646_1) && !EQ (tem, Qunicode_bmp))
467 return isMatch ? Fcons (ns_fallback_entity (), list) : Qnil; 467 return isMatch ? ns_fallback_entity () : Qnil;
468 468
469 cFamilies = ns_get_covering_families (ns_get_req_script (font_spec), 0.90); 469 cFamilies = ns_get_covering_families (ns_get_req_script (font_spec), 0.90);
470 470
@@ -483,9 +483,12 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
483 if (![cFamilies containsObject: 483 if (![cFamilies containsObject:
484 [desc objectForKey: NSFontFamilyAttribute]]) 484 [desc objectForKey: NSFontFamilyAttribute]])
485 continue; 485 continue;
486 list = Fcons (ns_descriptor_to_entity (desc, 486 tem = ns_descriptor_to_entity (desc,
487 AREF (font_spec, FONT_EXTRA_INDEX), 487 AREF (font_spec, FONT_EXTRA_INDEX),
488 NULL), list); 488 NULL);
489 if (isMatch)
490 return tem;
491 list = Fcons (tem, list);
489 if (fabs (ns_attribute_fvalue (desc, NSFontSlantTrait)) > 0.05) 492 if (fabs (ns_attribute_fvalue (desc, NSFontSlantTrait)) > 0.05)
490 foundItal = YES; 493 foundItal = YES;
491 } 494 }
@@ -503,8 +506,8 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
503 } 506 }
504 507
505 /* Return something if was a match and nothing found. */ 508 /* Return something if was a match and nothing found. */
506 if (isMatch && XINT (Flength (list)) == 0) 509 if (isMatch)
507 list = Fcons (ns_fallback_entity (), Qnil); 510 return ns_fallback_entity ();
508 511
509 if (NSFONT_TRACE) 512 if (NSFONT_TRACE)
510 fprintf (stderr, " Returning %d entities.\n", XINT (Flength (list))); 513 fprintf (stderr, " Returning %d entities.\n", XINT (Flength (list)));