Mercurial > hg > xemacs-beta
comparison src/objects-x.c @ 3097:859a2346db99
[xemacs-hg @ 2005-11-26 18:24:51 by stephent]
Build fixes. <87hd9z2rge.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Sat, 26 Nov 2005 18:25:03 +0000 |
parents | ad2f4ae9895b |
children | f94f72c6ceb0 |
comparison
equal
deleted
inserted
replaced
3096:5694c986bd92 | 3097:859a2346db99 |
---|---|
1153 { NULL, NULL, NULL } | 1153 { NULL, NULL, NULL } |
1154 }; | 1154 }; |
1155 | 1155 |
1156 /* Choose appropriate font name for debug messages. | 1156 /* Choose appropriate font name for debug messages. |
1157 Use only in the top half of next function (enforced with #undef). */ | 1157 Use only in the top half of next function (enforced with #undef). */ |
1158 #define SET_DEBUG_FONTNAME(name) \ | 1158 #define DECLARE_DEBUG_FONTNAME(__xemacs_name) \ |
1159 do { name = \ | 1159 Eistring *__xemacs_name; \ |
1160 debug_xft > 2 ? eistr_fullname \ | 1160 do \ |
1161 : debug_xft > 1 ? eistr_longname \ | 1161 { \ |
1162 : eistr_shortname } while (0) | 1162 __xemacs_name = debug_xft > 2 ? eistr_fullname \ |
1163 : debug_xft > 1 ? eistr_longname \ | |
1164 : eistr_shortname; \ | |
1165 } while (0) | |
1163 | 1166 |
1164 #endif /* USE_XFT */ | 1167 #endif /* USE_XFT */ |
1165 | 1168 |
1166 /* find a font spec that matches font spec FONT and also matches | 1169 /* find a font spec that matches font spec FONT and also matches |
1167 (the registry of) CHARSET. */ | 1170 (the registry of) CHARSET. */ |
1300 cr++) | 1303 cr++) |
1301 ; | 1304 ; |
1302 | 1305 |
1303 if (cr->rfc3066) | 1306 if (cr->rfc3066) |
1304 { | 1307 { |
1305 if (debug_xft > 0) | 1308 DECLARE_DEBUG_FONTNAME (name); |
1306 { | 1309 CHECKING_LANG (0, eidata(name), cr->language); |
1307 SET_DEBUG_FONTNAME (name); | |
1308 CHECKING_LANG (0, eidata(name), cr->language); | |
1309 } | |
1310 lang = cr->rfc3066; | 1310 lang = cr->rfc3066; |
1311 } | 1311 } |
1312 else if (cr->charset) | 1312 else if (cr->charset) |
1313 { | 1313 { |
1314 /* what the hey, build 'em on the fly */ | 1314 /* what the hey, build 'em on the fly */ |
1346 /* The full pattern with the bitmap coverage is massively | 1346 /* The full pattern with the bitmap coverage is massively |
1347 unwieldy, but the shorter names are's just *wrong*. We | 1347 unwieldy, but the shorter names are's just *wrong*. We |
1348 should have the full thing internally as truename, and | 1348 should have the full thing internally as truename, and |
1349 filter stuff the client doesn't want to see on output. | 1349 filter stuff the client doesn't want to see on output. |
1350 Should we just store it into the truename right here? */ | 1350 Should we just store it into the truename right here? */ |
1351 if (debug_xft > 0) | 1351 DECLARE_DEBUG_FONTNAME (name); |
1352 { | 1352 DEBUG_XFT2 (0, "Xft font %s supports %s\n", |
1353 SET_DEBUG_FONTNAME (name); | 1353 eidata(name), lang); |
1354 DEBUG_XFT2 (0, "Xft font %s supports %s\n", | |
1355 eidata(name), lang); | |
1356 } | |
1357 #ifdef RETURN_LONG_FONTCONFIG_NAMES | 1354 #ifdef RETURN_LONG_FONTCONFIG_NAMES |
1358 result = eimake_string(eistr_fullname); | 1355 result = eimake_string(eistr_fullname); |
1359 #else | 1356 #else |
1360 result = eimake_string(eistr_longname); | 1357 result = eimake_string(eistr_longname); |
1361 #endif | 1358 #endif |
1362 } | 1359 } |
1363 else | 1360 else |
1364 { | 1361 { |
1365 if (debug_xft > 0) | 1362 DECLARE_DEBUG_FONTNAME (name); |
1366 { | 1363 DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n", |
1367 SET_DEBUG_FONTNAME (name); | 1364 eidata(name), lang); |
1368 DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n", | |
1369 eidata(name), lang); | |
1370 } | |
1371 result = Qnil; | 1365 result = Qnil; |
1372 } | 1366 } |
1373 | 1367 |
1374 /* clean up */ | 1368 /* clean up */ |
1375 FcCharSetDestroy (fccs); | 1369 FcCharSetDestroy (fccs); |
1392 FcTypeOfValueToString (v)); | 1386 FcTypeOfValueToString (v)); |
1393 result = Qnil; | 1387 result = Qnil; |
1394 } | 1388 } |
1395 else if (FcLangSetHasLang (v.u.l, lang) != FcLangDifferentLang) | 1389 else if (FcLangSetHasLang (v.u.l, lang) != FcLangDifferentLang) |
1396 { | 1390 { |
1397 if (debug_xft > 0) | 1391 DECLARE_DEBUG_FONTNAME (name); |
1398 { | 1392 DEBUG_XFT2 (0, "Xft font %s supports %s\n", |
1399 SET_DEBUG_FONTNAME (name); | 1393 eidata(name), lang); |
1400 DEBUG_XFT2 (0, "Xft font %s supports %s\n", | |
1401 eidata(name), lang); | |
1402 } | |
1403 #ifdef RETURN_LONG_FONTCONFIG_NAMES | 1394 #ifdef RETURN_LONG_FONTCONFIG_NAMES |
1404 result = eimake_string(eistr_fullname); | 1395 result = eimake_string(eistr_fullname); |
1405 #else | 1396 #else |
1406 result = eimake_string(eistr_longname); | 1397 result = eimake_string(eistr_longname); |
1407 #endif | 1398 #endif |
1408 } | 1399 } |
1409 else | 1400 else |
1410 { | 1401 { |
1411 if (debug_xft > 0) | 1402 DECLARE_DEBUG_FONTNAME (name); |
1412 { | 1403 DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n", |
1413 SET_DEBUG_FONTNAME (name); | 1404 eidata(name), lang); |
1414 DEBUG_XFT2 (0, "Xft font %s doesn't support %s\n", | |
1415 eidata(name), lang); | |
1416 } | |
1417 result = Qnil; | 1405 result = Qnil; |
1418 } | 1406 } |
1419 } | 1407 } |
1420 else | 1408 else |
1421 { | 1409 { |
1432 return result; | 1420 return result; |
1433 } | 1421 } |
1434 | 1422 |
1435 DEBUG_XFT1 (0, "shit happens, try X11 charset match for %s\n", | 1423 DEBUG_XFT1 (0, "shit happens, try X11 charset match for %s\n", |
1436 XSTRING_DATA(font)); | 1424 XSTRING_DATA(font)); |
1437 #undef SET_DEBUG_FONTNAME | 1425 #undef DECLARE_DEBUG_FONTNAME |
1438 #endif /* USE_XFT */ | 1426 #endif /* USE_XFT */ |
1439 | 1427 |
1440 LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding); | 1428 LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding); |
1441 names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)), | 1429 names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)), |
1442 patternext, MAX_FONT_COUNT, &count); | 1430 patternext, MAX_FONT_COUNT, &count); |