… | |
… | |
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]); |