Mercurial > hg > xemacs-beta
comparison lwlib/lwlib-fonts.c @ 5455:7ebbe334061e
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Fri, 14 Jan 2011 23:16:18 +0100 |
parents | 308d34e9f07d c9d31263ab7d |
children |
comparison
equal
deleted
inserted
replaced
5454:03545aab8874 | 5455:7ebbe334061e |
---|---|
72 /* if (!NILP (Fxft_xlfd_font_name_p (make_string (name, strlen (name))))) */ | 72 /* if (!NILP (Fxft_xlfd_font_name_p (make_string (name, strlen (name))))) */ |
73 /* #### this is bogus but ... */ | 73 /* #### this is bogus but ... */ |
74 int count = 0; | 74 int count = 0; |
75 char *pos = name; | 75 char *pos = name; |
76 /* extra parens shut up gcc */ | 76 /* extra parens shut up gcc */ |
77 while ((pos = index (pos, '-'))) | 77 while ((pos = strchr (pos, '-'))) |
78 { | 78 { |
79 count++; | 79 count++; |
80 pos++; | 80 pos++; |
81 } | 81 } |
82 | 82 |
83 /* #### hard-coding DefaultScreen is evil! */ | 83 /* #### hard-coding DefaultScreen is evil! */ |
84 if (count == 14 /* fully-qualified XLFD */ | 84 if (count == 14 /* fully-qualified XLFD */ |
85 || (count < 14 /* heuristic for wildcarded XLFD */ | 85 || (count < 14 /* heuristic for wildcarded XLFD */ |
86 && count >= 5 | 86 && count >= 5 |
87 && index (name, '*'))) | 87 && strchr (name, '*'))) |
88 res = XftFontOpenXlfd (dpy, DefaultScreen (dpy), name); | 88 res = XftFontOpenXlfd (dpy, DefaultScreen (dpy), name); |
89 else | 89 else |
90 res = XftFontOpenName (dpy, DefaultScreen (dpy), name); | 90 res = XftFontOpenName (dpy, DefaultScreen (dpy), name); |
91 | 91 |
92 /* Try for a generic monospace font | 92 /* Try for a generic monospace font |