ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/xcb/xcb.c
(Generate patch)

Comparing xcb/xcb.c (file contents):
Revision 1.2 by root, Thu Oct 10 12:22:32 2002 UTC vs.
Revision 1.5 by root, Sun Jan 2 20:23:21 2022 UTC

225 Font_GetSize (pattern, &pixel_size); 225 Font_GetSize (pattern, &pixel_size);
226 226
227 /* modify elements of font name to fit usual font names */ 227 /* modify elements of font name to fit usual font names */
228 if (!strcmp (weight, "*")) 228 if (!strcmp (weight, "*"))
229 strncpy (weight, "medium", FONT_ELEMENT_SIZE); 229 strncpy (weight, "medium", FONT_ELEMENT_SIZE);
230
230 if (!strcmp (slant, "*")) 231 if (!strcmp (slant, "*"))
231 strncpy (slant, "r", FONT_ELEMENT_SIZE); 232 strncpy (slant, "r", FONT_ELEMENT_SIZE);
233
232 if (pixel_size < 3) 234 if (pixel_size < 3)
233 pixel_size = 3; 235 pixel_size = 3;
234 else if (pixel_size > 97) 236 else if (pixel_size > 97)
235 pixel_size = 97; 237 pixel_size = 97;
236 238
245 pattern, 247 pattern,
246 weight, slant, pixel_size, 248 weight, slant, pixel_size,
247 pixel_size); 249 pixel_size);
248 pattern = pattern2; 250 pattern = pattern2;
249 } 251 }
252
250 if (*n_miss) 253 if (*n_miss)
251 XFreeStringList (*miss); 254 XFreeStringList (*miss);
255
252 if (fs) 256 if (fs)
253 XFreeFontSet (d, fs); 257 XFreeFontSet (d, fs);
254 258
255 /* create fontset */ 259 /* create fontset */
256 fs = XCreateFontSet (d, pattern, miss, n_miss, def); 260 fs = XCreateFontSet (d, pattern, miss, n_miss, def);
315 0L, 10000000L, False, AnyPropertyType, 319 0L, 10000000L, False, AnyPropertyType,
316 &pt.encoding, &pt.format, &pt.nitems, 320 &pt.encoding, &pt.format, &pt.nitems,
317 &after, &pt.value) != Success || !pt.nitems) 321 &after, &pt.value) != Success || !pt.nitems)
318 return strdup (""); 322 return strdup ("");
319 323
320 if (pt.nitems) 324 if (pt.nitems && pt.format == 8)
321 { 325 {
322 (force_mb ? XmbTextPropertyToTextList : Xutf8TextPropertyToTextList) 326 (force_mb ? XmbTextPropertyToTextList : Xutf8TextPropertyToTextList)
323 (dpy, &pt, &list, &count); 327 (dpy, &pt, &list, &count);
324 328
325 data = strdup (list[0]); 329 data = strdup (list[0]);
1165 NULL); /* destructor function */ 1169 NULL); /* destructor function */
1166 1170
1167 XtGetApplicationResources (top, &ares, res, XtNumber (res), 0, 0); 1171 XtGetApplicationResources (top, &ares, res, XtNumber (res), 0, 0);
1168 nbuffs = max (ares.nbuffs, 1); 1172 nbuffs = max (ares.nbuffs, 1);
1169 1173
1174 xa_compound_text = XInternAtom (dpy, "COMPOUND_TEXT", False);
1175 xa_utf8_string = XInternAtom (dpy, "UTF8_STRING", False);
1176 xa_text = XInternAtom (dpy, "TEXT", False);
1177
1178 if (!xa_utf8_string)
1179 xa_utf8_string = xa_compound_text;
1180
1170 /* search for the -u and -v switches first */ 1181 /* search for the -u and -v switches first */
1171 for (p = argv + 1; p < argv + argc; p++) 1182 for (p = argv + 1; p < argv + argc; p++)
1172 { 1183 {
1173 if (eq (*p, "-u")) 1184 if (eq (*p, "-u"))
1174 use_utf8 = 1; 1185 use_utf8 = 1;
1281 XtRealizeWidget (top); 1292 XtRealizeWidget (top);
1282 1293
1283 delwin = XInternAtom (dpy, "WM_DELETE_WINDOW", False); 1294 delwin = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
1284 XSetWMProtocols (dpy, XtWindow (top), &delwin, 1); 1295 XSetWMProtocols (dpy, XtWindow (top), &delwin, 1);
1285 XtAddEventHandler (top, 0, True, wmdel, (XtPointer) 0); 1296 XtAddEventHandler (top, 0, True, wmdel, (XtPointer) 0);
1286
1287 xa_compound_text = XInternAtom (dpy, "COMPOUND_TEXT", False);
1288 xa_utf8_string = XInternAtom (dpy, "UTF8_STRING", False);
1289 xa_text = XInternAtom (dpy, "TEXT", False);
1290
1291 if (!xa_utf8_string)
1292 xa_utf8_string = xa_compound_text;
1293 1297
1294 initialize_properties (); 1298 initialize_properties ();
1295} 1299}
1296 1300
1297/* 1301/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines