Mercurial > hg > xemacs-beta
comparison src/objects-x.c @ 4985:358aa3bb603f
Automatic merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Fri, 05 Feb 2010 12:12:28 -0600 |
| parents | 3c3c1d139863 |
| children |
comparison
equal
deleted
inserted
replaced
| 4984:f23cd0184dcf | 4985:358aa3bb603f |
|---|---|
| 65 | 65 |
| 66 xzero (*color); | 66 xzero (*color); |
| 67 { | 67 { |
| 68 const Extbyte *extname; | 68 const Extbyte *extname; |
| 69 | 69 |
| 70 LISP_STRING_TO_EXTERNAL (name, extname, Qx_color_name_encoding); | 70 extname = LISP_STRING_TO_EXTERNAL (name, Qx_color_name_encoding); |
| 71 result = XParseColor (dpy, cmap, extname, color); | 71 result = XParseColor (dpy, cmap, extname, color); |
| 72 } | 72 } |
| 73 if (!result) | 73 if (!result) |
| 74 { | 74 { |
| 75 maybe_signal_error (Qgui_error, "Unrecognized color", | 75 maybe_signal_error (Qgui_error, "Unrecognized color", |
| 192 XColor c; | 192 XColor c; |
| 193 Display *dpy = DEVICE_X_DISPLAY (d); | 193 Display *dpy = DEVICE_X_DISPLAY (d); |
| 194 Colormap cmap = DEVICE_X_COLORMAP (d); | 194 Colormap cmap = DEVICE_X_COLORMAP (d); |
| 195 const Extbyte *extname; | 195 const Extbyte *extname; |
| 196 | 196 |
| 197 LISP_STRING_TO_EXTERNAL (color, extname, Qx_color_name_encoding); | 197 extname = LISP_STRING_TO_EXTERNAL (color, Qx_color_name_encoding); |
| 198 | 198 |
| 199 return XParseColor (dpy, cmap, extname, &c); | 199 return XParseColor (dpy, cmap, extname, &c); |
| 200 } | 200 } |
| 201 | 201 |
| 202 static Lisp_Object | 202 static Lisp_Object |
| 230 /* #### serialize (optimize) these later... */ | 230 /* #### serialize (optimize) these later... */ |
| 231 /* #### This function really needs to go away. | 231 /* #### This function really needs to go away. |
| 232 The problem is that the fontconfig/Xft functions work much too hard | 232 The problem is that the fontconfig/Xft functions work much too hard |
| 233 to ensure that something is returned; but that something need not be | 233 to ensure that something is returned; but that something need not be |
| 234 at all close to what we asked for. */ | 234 at all close to what we asked for. */ |
| 235 LISP_STRING_TO_EXTERNAL (f->name, extname, Qfc_font_name_encoding); | 235 extname = LISP_STRING_TO_EXTERNAL (f->name, Qfc_font_name_encoding); |
| 236 rf = xft_open_font_by_name (dpy, extname); | 236 rf = xft_open_font_by_name (dpy, extname); |
| 237 #endif | 237 #endif |
| 238 LISP_STRING_TO_EXTERNAL (f->name, extname, Qx_font_name_encoding); | 238 extname = LISP_STRING_TO_EXTERNAL (f->name, Qx_font_name_encoding); |
| 239 /* With XFree86 4.0's fonts, XListFonts returns an entry for | 239 /* With XFree86 4.0's fonts, XListFonts returns an entry for |
| 240 -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0 but | 240 -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0 but |
| 241 an XLoadQueryFont on the corresponding XLFD returns NULL. | 241 an XLoadQueryFont on the corresponding XLFD returns NULL. |
| 242 | 242 |
| 243 XListFonts is not trustworthy (of course, this is news to exactly | 243 XListFonts is not trustworthy (of course, this is news to exactly |
| 783 | 783 |
| 784 /* OK, fall back to core font. */ | 784 /* OK, fall back to core font. */ |
| 785 if (NILP (FONT_INSTANCE_TRUENAME (f)) | 785 if (NILP (FONT_INSTANCE_TRUENAME (f)) |
| 786 && FONT_INSTANCE_X_FONT (f)) | 786 && FONT_INSTANCE_X_FONT (f)) |
| 787 { | 787 { |
| 788 nameext = NEW_LISP_STRING_TO_EXTERNAL (f->name, Qx_font_name_encoding); | 788 nameext = LISP_STRING_TO_EXTERNAL (f->name, Qx_font_name_encoding); |
| 789 FONT_INSTANCE_TRUENAME (f) = | 789 FONT_INSTANCE_TRUENAME (f) = |
| 790 x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f)); | 790 x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f)); |
| 791 } | 791 } |
| 792 | 792 |
| 793 if (NILP (FONT_INSTANCE_TRUENAME (f))) | 793 if (NILP (FONT_INSTANCE_TRUENAME (f))) |
| 878 int count = 0; | 878 int count = 0; |
| 879 int max_number = MAX_FONT_COUNT; | 879 int max_number = MAX_FONT_COUNT; |
| 880 Lisp_Object result = Qnil; | 880 Lisp_Object result = Qnil; |
| 881 const Extbyte *patternext; | 881 const Extbyte *patternext; |
| 882 | 882 |
| 883 LISP_STRING_TO_EXTERNAL (pattern, patternext, Qx_font_name_encoding); | 883 patternext = LISP_STRING_TO_EXTERNAL (pattern, Qx_font_name_encoding); |
| 884 | 884 |
| 885 if (!NILP(maxnumber) && INTP(maxnumber)) | 885 if (!NILP(maxnumber) && INTP(maxnumber)) |
| 886 { | 886 { |
| 887 max_number = XINT(maxnumber); | 887 max_number = XINT(maxnumber); |
| 888 } | 888 } |
