Mercurial > emacs
changeset 104058:85bf43e7dada
* nsfont.m (ns_findfonts): Correctly return fallback in match case.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Fri, 24 Jul 2009 15:43:22 +0000 |
parents | 00b7bce74d52 |
children | 3750eeb20ab9 |
files | src/ChangeLog src/nsfont.m |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Jul 24 12:14:02 2009 +0000 +++ b/src/ChangeLog Fri Jul 24 15:43:22 2009 +0000 @@ -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.
--- a/src/nsfont.m Fri Jul 24 12:14:02 2009 +0000 +++ b/src/nsfont.m Fri Jul 24 15:43:22 2009 +0000 @@ -464,7 +464,7 @@ /* 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 @@ "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)));