From 0389ecf9f02c302716358749c8e490b76c02a24c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 10 Jan 2018 21:36:17 -0800 Subject: [PATCH] UI: Use GDI+ text for multiview on windows Fixes an issue where text would not have language glyph fallback if another language would used. This problem still needs a solution on linux/mac (and preferably a fix for language glyph fallbacks when using freetype 2 in general). --- UI/window-projector.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/UI/window-projector.cpp b/UI/window-projector.cpp index 3c14815ca..565c57e80 100644 --- a/UI/window-projector.cpp +++ b/UI/window-projector.cpp @@ -116,7 +116,13 @@ static OBSSource CreateLabel(const char *name, size_t h) obs_data_set_string(settings, "text", text.c_str()); obs_data_set_bool(settings, "outline", true); - OBSSource txtSource = obs_source_create_private("text_ft2_source", name, +#ifdef _WIN32 + const char *text_source_id = "text_gdiplus"; +#else + const char *text_source_id = "text_ft2_source"; +#endif + + OBSSource txtSource = obs_source_create_private(text_source_id, name, settings); obs_source_release(txtSource); @@ -835,9 +841,6 @@ void OBSProjector::UpdateMultiview() name += " - "; name += obs_source_get_name(src); - if (name.size() > 15) - name.resize(15); - multiviewLabels[curIdx + 2] = CreateLabel(name.c_str(), h / 4); curIdx++;