diff --git a/src/mouse.cpp b/src/mouse.cpp index 699f3e26..6c22a0cb 100644 --- a/src/mouse.cpp +++ b/src/mouse.cpp @@ -1117,7 +1117,7 @@ void GraphicsWindow::MouseLeftDown(double mx, double my, bool shiftDown, bool ct AddToPending(hr); Request *r = SK.GetRequest(hr); r->str = "Abc"; - r->font = "BitstreamVeraSans-Roman-builtin.ttf"; + r->font = Platform::embeddedFont; for(int i = 1; i <= 4; i++) { SK.GetEntity(hr.entity(i))->PointForceTo(v); diff --git a/src/platform/platform.h b/src/platform/platform.h index 5664fa21..21c2b2bf 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -17,6 +17,12 @@ std::string Narrow(const std::wstring &s); std::wstring Widen(const std::string &s); #endif +#if defined(_WIN32) + const std::string embeddedFont = "res://fonts/BitstreamVeraSans-Roman-builtin.ttf"; +#else // Linux and macOS + const std::string embeddedFont = "BitstreamVeraSans-Roman-builtin.ttf"; +#endif + // A filesystem path, respecting the conventions of the current platform. // Transformation functions return an empty path on error. class Path {