diff options
| author | Adrian Robert | 2009-07-24 15:43:22 +0000 |
|---|---|---|
| committer | Adrian Robert | 2009-07-24 15:43:22 +0000 |
| commit | 1395c6f54c37e5ee4e870d39180b07dba2060b73 (patch) | |
| tree | 553d3f765ad4dd4dd1524e856f3842c2ea9f687c /src | |
| parent | 22556bc5c72fa902e97619c8a2f8b2cde931561b (diff) | |
| download | emacs-1395c6f54c37e5ee4e870d39180b07dba2060b73.tar.gz emacs-1395c6f54c37e5ee4e870d39180b07dba2060b73.zip | |
* nsfont.m (ns_findfonts): Correctly return fallback in match case.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/nsfont.m | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5ec38e71b7c..7814f8a637e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-07-24 Adrian Robert <Adrian.B.Robert@gmail.com> | ||
| 2 | |||
| 3 | * nsfont.m (ns_findfonts): Correctly return fallback in match case. | ||
| 4 | |||
| 1 | 2009-07-23 Yavor Doganov <yavor@gnu.org> | 5 | 2009-07-23 Yavor Doganov <yavor@gnu.org> |
| 2 | 6 | ||
| 3 | * nsfont.m (NSFontDescriptor.h): Explicitly include under GNUstep. | 7 | * nsfont.m (NSFontDescriptor.h): Explicitly include under GNUstep. |
diff --git a/src/nsfont.m b/src/nsfont.m index 33bbe37ab65..100676762a8 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 ? ns_fallback_entity () : Qnil; | 467 | return isMatch ? Fcons (ns_fallback_entity (), list) : 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 | ||
| @@ -502,6 +502,10 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch) | |||
| 502 | "synthItal"), list); | 502 | "synthItal"), list); |
| 503 | } | 503 | } |
| 504 | 504 | ||
| 505 | /* Return something if was a match and nothing found. */ | ||
| 506 | if (isMatch && XINT (Flength (list)) == 0) | ||
| 507 | list = Fcons (ns_fallback_entity (), Qnil); | ||
| 508 | |||
| 505 | if (NSFONT_TRACE) | 509 | if (NSFONT_TRACE) |
| 506 | fprintf (stderr, " Returning %d entities.\n", XINT (Flength (list))); | 510 | fprintf (stderr, " Returning %d entities.\n", XINT (Flength (list))); |
| 507 | 511 | ||