mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-20 16:54:26 +08:00
Linux fix include
This commit is contained in:
parent
a34a4954bd
commit
35b54eb455
@ -33,19 +33,6 @@
|
|||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// no specific include - already inside of libslic3r/Emboss.hpp
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#include <wx/uri.h>
|
|
||||||
#include <CoreText/CTFont.h>
|
|
||||||
#include <wx/osx/core/cfdictionary.h>
|
|
||||||
#elif defined(__linux__)
|
|
||||||
// Font Config must exist
|
|
||||||
#include <wx/filename.h>
|
|
||||||
#include <fontconfig/fontconfig.h>
|
|
||||||
#include "slic3r/Utils/FontConfigHelp.hpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// uncomment for easier debug
|
// uncomment for easier debug
|
||||||
//#define ALLOW_DEBUG_MODE
|
//#define ALLOW_DEBUG_MODE
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#include "FontConfigHelp.hpp"
|
#include "FontConfigHelp.hpp"
|
||||||
|
|
||||||
#ifdef EXIST_FONT_CONFIG_INCLUDE
|
#ifdef EXIST_FONT_CONFIG_INCLUDE
|
||||||
|
|
||||||
|
#include <wx/filename.h>
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
|
#include "libslic3r/Utils.hpp"
|
||||||
|
|
||||||
using namespace Slic3r::GUI;
|
using namespace Slic3r::GUI;
|
||||||
|
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
#include "WxFontUtils.hpp"
|
#include "WxFontUtils.hpp"
|
||||||
#include "libslic3r/MapUtils.hpp"
|
#include "libslic3r/MapUtils.hpp"
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#include <wx/uri.h>
|
||||||
|
#include <CoreText/CTFont.h>
|
||||||
|
#include <wx/osx/core/cfdictionary.h>
|
||||||
|
#elif defined(__linux__)
|
||||||
|
#include "slic3r/Utils/FontConfigHelp.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Slic3r;
|
using namespace Slic3r;
|
||||||
using namespace Slic3r::GUI;
|
using namespace Slic3r::GUI;
|
||||||
|
|
||||||
@ -27,7 +35,7 @@ std::optional<Emboss::Font> WxFontUtils::load_font(const wxFont &font)
|
|||||||
return Emboss::load_font(file_path.c_str());
|
return Emboss::load_font(file_path.c_str());
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
static FontConfigHelp help;
|
static FontConfigHelp help;
|
||||||
std::string font_path = help.get_font_path(font);
|
std::string font_path = help.get_font_path(font);
|
||||||
if (font_path.empty()) return {};
|
if (font_path.empty()) return {};
|
||||||
return Emboss::load_font(font_path.c_str());
|
return Emboss::load_font(font_path.c_str());
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user