Set default font if font name is given with NULL.

This commit is contained in:
Jaehyun Cho 2015-03-26 22:52:55 +09:00
parent 4439ca4d75
commit 6b21eeab0f
2 changed files with 6 additions and 4 deletions

View File

@ -1010,7 +1010,9 @@ text_setting_font_apply(const char *font_name, const char *font_style)
snprintf(text_class_name, sizeof(text_class_name), "%s_setting_entry",
elm_app_name_get());
char *font = elm_font_fontconfig_name_get(font_name, font_style);
char *font = NULL;
if (font_name)
font = elm_font_fontconfig_name_get(font_name, font_style);
edje_text_class_set(text_class_name, font, -100);
elm_font_fontconfig_name_free(font);

View File

@ -125,9 +125,9 @@ entry_recover(edit_data *ed, int cursor_pos)
static void
edit_font_apply(edit_data *ed, const char *font_name, const char *font_style)
{
if (!font_name) return;
char *font = elm_font_fontconfig_name_get(font_name, font_style);
char *font = NULL;
if (font_name)
font = elm_font_fontconfig_name_get(font_name, font_style);
edje_text_class_set("enventor_entry", font, -100);
elm_font_fontconfig_name_free(font);