/* do matching */
set = FcFontSort(font_config, pat, FcTrue, NULL, &res);
- if (set) {
- if (0 < set->nfont) {
- FcPatternGetString(set->fonts[0], FC_FAMILY, 0, &family);
+ do {
+ if (set && 0 < set->nfont) {
+ int result = FcPatternGetString(set->fonts[0], FC_FAMILY, 0, &family);
+ if (FcResultMatch != result) {
+ ERR("FcPatternGetString() Fail(%d)", result);
+ ret = NULL;
+ break;
+ }
if (family)
ret = strdup((char*)family);
}
+ } while(0);
+
+ if (set)
FcFontSetDestroy(set);
- }
FcPatternDestroy(pat);
FcConfigDestroy(font_config);
void *ee;
void *evas;
- if (ecore_evas_init()) {
+ if (0 == ecore_evas_init()) {
ERR("ecore_evas_init() Fail");
return false;
}
- ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
+ ee = ecore_evas_buffer_new(100, 100);
evas = ecore_evas_get(ee);
void *img = evas_object_image_add(evas);