From ec4016cafdce8977b40127e8e45800dc1a1281e0 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 24 Aug 2014 08:36:56 -0700 Subject: [PATCH] Use better default fonts On windows, Arial is probably one of the most commonly used. Mac, Helvetica. The rest, Sans Serif. --- plugins/text-freetype2/text-freetype2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/text-freetype2/text-freetype2.c b/plugins/text-freetype2/text-freetype2.c index 91c85435a..5f0097324 100644 --- a/plugins/text-freetype2/text-freetype2.c +++ b/plugins/text-freetype2/text-freetype2.c @@ -405,6 +405,14 @@ error: obs_data_release(font_obj); } +#ifdef _WIN32 +#define DEFAULT_FACE "Arial" +#elif __APPLE__ +#define DEFAULT_FACE "Helvetica" +#else +#define DEFAULT_FACE "Sans Serif" +#endif + static void *ft2_source_create(obs_data_t settings, obs_source_t source) { struct ft2_source *srcdata = bzalloc(sizeof(struct ft2_source)); @@ -413,7 +421,7 @@ static void *ft2_source_create(obs_data_t settings, obs_source_t source) srcdata->font_size = 32; - obs_data_set_default_string(font_obj, "face", "Arial"); + obs_data_set_default_string(font_obj, "face", DEFAULT_FACE); obs_data_set_default_int(font_obj, "size", 32); obs_data_set_default_obj(settings, "font", font_obj); -- GitLab