Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diag font: use path relative to executable. #1308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/core/diagnostics/osd_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#include <tbb/concurrent_unordered_map.h>

#include <boost/dll.hpp>

#include <GL/glew.h>

#include <atomic>
Expand Down Expand Up @@ -65,8 +67,9 @@ sf::Font& get_default_font()
{
static sf::Font DEFAULT_FONT = []() {
sf::Font font;
if (!font.loadFromFile("LiberationMono-Regular.ttf"))
CASPAR_THROW_EXCEPTION(file_not_found() << msg_info("LiberationMono-Regular.ttf not found"));
auto font_path = boost::dll::program_location().parent_path().parent_path().string() + "/LiberationMono-Regular.ttf";
if (!font.loadFromFile(font_path))
CASPAR_THROW_EXCEPTION(file_not_found() << msg_info(font_path + " not found"));
return font;
}();

Expand Down