From a60c2cb71352a1127a1fca780298b21f66f478c0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 16 Nov 2016 15:16:00 -0600 Subject: [PATCH] FS-9740 cont --- src/mod/applications/mod_conference/conference_video.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 8e6baf0247..46d14de653 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -825,7 +825,7 @@ void conference_video_layer_set_logo(conference_member_t *member, mcu_layer_t *l void conference_video_layer_set_banner(conference_member_t *member, mcu_layer_t *layer, const char *text) { switch_rgb_color_t fgcolor, bgcolor; - int font_scale = 4; + int font_scale = 1; uint16_t font_size = 0; const char *fg = "#cccccc"; const char *bg = "#142e55"; @@ -894,14 +894,15 @@ void conference_video_layer_set_banner(conference_member_t *member, mcu_layer_t if ((var = switch_event_get_header(params, "font_scale"))) { int tmp = atoi(var); - if (tmp >= 5 && tmp <= 50) { + if (tmp >= 0 && tmp <= 50) { font_scale = tmp; } } } if (!text) text = "N/A"; - font_size = (uint16_t)((double)(font_scale / 100.0f) * (layer->screen_w - (strlen(text) * 10))); + + font_size = (uint16_t)(((double)layer->screen_w / ((double)strlen(text) / 1.2f)) * font_scale); if (font_size <= 5) font_size = 5; if (font_size >= 24) font_size = 24;