diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2005-07-13 09:13:19 +0000 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2005-07-13 09:13:19 +0000 |
commit | 17d0f03b645c00637a555a6475f17f9efb4611e5 (patch) | |
tree | 60c91b184b92f38b9dc300955793a060395c75a0 | |
parent | 95dfb192752c48823cabe86399ed29d1d9edd04d (diff) | |
download | emacs-17d0f03b645c00637a555a6475f17f9efb4611e5.tar.gz emacs-17d0f03b645c00637a555a6475f17f9efb4611e5.tar.bz2 emacs-17d0f03b645c00637a555a6475f17f9efb4611e5.zip |
(try_font_list) [MAC_OS]: Try font family name
beginning with that for ASCII.
-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) nfonts = try_alternative_families (f, try_family, registry, fonts); #ifdef MAC_OS - /* When realizing the default face and a font spec does not matched - exactly, Emacs looks for ones with the same registry as the - default font. On the Mac, this is mac-roman, which does not work - if the family is -etl-fixed, e.g. The following widens the - choices and fixes that problem. */ - if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry) - && xstricmp (SDATA (registry), "mac-roman") == 0) - nfonts = try_alternative_families (f, try_family, Qnil, fonts); + if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry)) + if (xstricmp (SDATA (registry), "mac-roman") == 0) + /* When realizing the default face and a font spec does not + matched exactly, Emacs looks for ones with the same registry + as the default font. On the Mac, this is mac-roman, which + does not work if the family is -etl-fixed, e.g. The + following widens the choices and fixes that problem. */ + nfonts = try_alternative_families (f, try_family, Qnil, fonts); + else if (SBYTES (try_family) > 0 + && SREF (try_family, SBYTES (try_family) - 1) != '*') + /* Some Central European/Cyrillic font family names have the + Roman counterpart name as their prefix. */ + nfonts = try_alternative_families (f, concat2 (try_family, + build_string ("*")), + registry, fonts); #endif if (EQ (try_family, family)) |