diff options
| author | YAMAMOTO Mitsuharu | 2005-07-13 09:13:19 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2005-07-13 09:13:19 +0000 |
| commit | 17d0f03b645c00637a555a6475f17f9efb4611e5 (patch) | |
| tree | 60c91b184b92f38b9dc300955793a060395c75a0 /src | |
| parent | 95dfb192752c48823cabe86399ed29d1d9edd04d (diff) | |
| download | emacs-17d0f03b645c00637a555a6475f17f9efb4611e5.tar.gz emacs-17d0f03b645c00637a555a6475f17f9efb4611e5.zip | |
(try_font_list) [MAC_OS]: Try font family name
beginning with that for ASCII.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 2fb02360e50..af9571a102f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6745,14 +6745,21 @@ try_font_list (f, attrs, family, registry, fonts, prefer_face_family) | |||
| 6745 | nfonts = try_alternative_families (f, try_family, registry, fonts); | 6745 | nfonts = try_alternative_families (f, try_family, registry, fonts); |
| 6746 | 6746 | ||
| 6747 | #ifdef MAC_OS | 6747 | #ifdef MAC_OS |
| 6748 | /* When realizing the default face and a font spec does not matched | 6748 | if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry)) |
| 6749 | exactly, Emacs looks for ones with the same registry as the | 6749 | if (xstricmp (SDATA (registry), "mac-roman") == 0) |
| 6750 | default font. On the Mac, this is mac-roman, which does not work | 6750 | /* When realizing the default face and a font spec does not |
| 6751 | if the family is -etl-fixed, e.g. The following widens the | 6751 | matched exactly, Emacs looks for ones with the same registry |
| 6752 | choices and fixes that problem. */ | 6752 | as the default font. On the Mac, this is mac-roman, which |
| 6753 | if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry) | 6753 | does not work if the family is -etl-fixed, e.g. The |
| 6754 | && xstricmp (SDATA (registry), "mac-roman") == 0) | 6754 | following widens the choices and fixes that problem. */ |
| 6755 | nfonts = try_alternative_families (f, try_family, Qnil, fonts); | 6755 | nfonts = try_alternative_families (f, try_family, Qnil, fonts); |
| 6756 | else if (SBYTES (try_family) > 0 | ||
| 6757 | && SREF (try_family, SBYTES (try_family) - 1) != '*') | ||
| 6758 | /* Some Central European/Cyrillic font family names have the | ||
| 6759 | Roman counterpart name as their prefix. */ | ||
| 6760 | nfonts = try_alternative_families (f, concat2 (try_family, | ||
| 6761 | build_string ("*")), | ||
| 6762 | registry, fonts); | ||
| 6756 | #endif | 6763 | #endif |
| 6757 | 6764 | ||
| 6758 | if (EQ (try_family, family)) | 6765 | if (EQ (try_family, family)) |