Mercurial > emacs
comparison src/ftfont.c @ 90516:43ea66432bf9
(ftfont_list): Pay attention to the case that
FC_CAPABILITY is not defined.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 05 Jul 2006 11:28:20 +0000 |
parents | 891aa54b7498 |
children | 64c755511769 |
comparison
equal
deleted
inserted
replaced
90515:83058d9ed764 | 90516:43ea66432bf9 |
---|---|
468 objset = FcObjectSetBuild (FC_FOUNDRY, FC_FAMILY, FC_WEIGHT, FC_SLANT, | 468 objset = FcObjectSetBuild (FC_FOUNDRY, FC_FAMILY, FC_WEIGHT, FC_SLANT, |
469 FC_WIDTH, FC_PIXEL_SIZE, FC_SPACING, | 469 FC_WIDTH, FC_PIXEL_SIZE, FC_SPACING, |
470 FC_CHARSET, FC_FILE, NULL); | 470 FC_CHARSET, FC_FILE, NULL); |
471 if (! objset) | 471 if (! objset) |
472 goto err; | 472 goto err; |
473 if (otf_script[0] && ! FcObjectSetAdd (objset, FC_CAPABILITY)) | 473 if (otf_script[0]) |
474 goto err; | 474 { |
475 #ifndef FC_CAPABILITY | |
476 goto finish; | |
477 #else /* not FC_CAPABILITY */ | |
478 if (! FcObjectSetAdd (objset, FC_CAPABILITY)) | |
479 goto err; | |
480 } | |
481 #endif /* not FC_CAPABILITY */ | |
475 | 482 |
476 fontset = FcFontList (NULL, pattern, objset); | 483 fontset = FcFontList (NULL, pattern, objset); |
477 if (! fontset) | 484 if (! fontset) |
478 goto err; | 485 goto err; |
479 | 486 |
510 && (weight != 100 | 517 && (weight != 100 |
511 || this < FC_WEIGHT_REGULAR | 518 || this < FC_WEIGHT_REGULAR |
512 || this > FC_WEIGHT_MEDIUM))) | 519 || this > FC_WEIGHT_MEDIUM))) |
513 continue; | 520 continue; |
514 } | 521 } |
522 #ifdef FC_CAPABILITY | |
515 if (otf_script[0]) | 523 if (otf_script[0]) |
516 { | 524 { |
517 FcChar8 *this; | 525 FcChar8 *this; |
518 | 526 |
519 if (FcPatternGetString (fontset->fonts[i], FC_CAPABILITY, 0, | 527 if (FcPatternGetString (fontset->fonts[i], FC_CAPABILITY, 0, |
520 &this) != FcResultMatch | 528 &this) != FcResultMatch |
521 || ! strstr ((char *) this, otf_script)) | 529 || ! strstr ((char *) this, otf_script)) |
522 continue; | 530 continue; |
523 } | 531 } |
532 #endif /* FC_CAPABILITY */ | |
524 entity = ftfont_pattern_entity (fontset->fonts[i], frame, registry); | 533 entity = ftfont_pattern_entity (fontset->fonts[i], frame, registry); |
525 if (! NILP (entity)) | 534 if (! NILP (entity)) |
526 val = Fcons (entity, val); | 535 val = Fcons (entity, val); |
527 } | 536 } |
528 val = Fvconcat (1, &val); | 537 val = Fvconcat (1, &val); |