]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7506: make core specify default font instead of each place we use it
authorMichael Jerris <mike@jerris.com>
Fri, 17 Apr 2015 21:42:24 +0000 (17:42 -0400)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:22 +0000 (12:47 -0500)
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_cv/mod_cv.cpp
src/switch_core_video.c

index 6ffa314b863d6ec8618424260762c6d53fe370cc..4ab6edde9a4201f17fe5db832cbdbd911688e697 100644 (file)
@@ -1251,7 +1251,7 @@ static void layer_set_banner(conference_member_t *member, mcu_layer_t *layer, co
        const char *bg = "#142e55";
        char *parsed = NULL;
        switch_event_t *params = NULL;
-       const char *font_face = "/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf";
+       const char *font_face = NULL;
        const char *var, *tmp = NULL;
        char *dup = NULL;
        
index 5ae714bcbc8c73335d0ad36262a1163e25673623..d9e46ff6ca90f26282ec7711b9e3d4f1bf69dea4 100644 (file)
@@ -287,10 +287,6 @@ static void stop_ticker(cv_context_t *context)
 static void set_ticker(cv_context_t *context, const char *fg, const char *bg, const char *font_face, const char *fontsz, int speed, switch_img_position_t pos, const char *text)
 {
 
-    if (zstr(font_face)) {
-        font_face = "FreeMono.ttf";
-    }
-
     if (zstr(fg)) {
         fg = "#cccccc";
     }
@@ -362,11 +358,6 @@ static int add_text(cv_context_t *context, const char *nick, const char *fg, con
         }
     }
 
-
-    if (zstr(font_face)) {
-        font_face = "FreeMono.ttf";
-    }
-
     if (zstr(fg)) {
         fg = "#cccccc";
     }
index 9d7e8bb0ab7b9ddae58f148cb2a52203fb00369d..fc50fa883b2b5fa61aa21cecd22dab82c4d73ba6 100644 (file)
@@ -508,6 +508,10 @@ SWITCH_DECLARE(switch_status_t) switch_img_txt_handle_create(switch_img_txt_hand
        new_handle->pool = pool;
        new_handle->free_pool = free_pool;
 
+    if (zstr(font_family)) {
+               font_family = switch_core_sprintf(new_handle->pool, "%s%s%s",SWITCH_GLOBAL_dirs.fonts_dir, SWITCH_PATH_SEPARATOR, "FreeMono.ttf");
+    }
+
        if (!switch_is_file_path(font_family)) {
                new_handle->font_family = switch_core_sprintf(new_handle->pool, "%s%s%s",SWITCH_GLOBAL_dirs.fonts_dir, SWITCH_PATH_SEPARATOR, font_family);
        } else {