../src/slic3r/Utils/WxFontUtils.cpp💯27: error: 'error' was not declared in this scope; did you mean 'perror'?
../src/slic3r/Utils/WxFontUtils.cpp💯9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope
../src/slic3r/Utils/WxFontUtils.cpp:146:5: error: 'wxSystemFont' was not declared in this scope; did you mean 'wxSystem'?
../src/slic3r/Utils/WxFontUtils.cpp:147:32: error: 'wxSystemSettings' has not been declared
../src/slic3r/Utils/WxFontUtils.cpp:147:58: error: 'system_font' was not declared in this scope
This commit is contained in:
Filip Sykala - NTB T15p 2022-11-22 15:56:17 +01:00
parent ed4c68dfb2
commit 9b7e6db906
3 changed files with 11 additions and 15 deletions

View File

@ -824,7 +824,6 @@ EmbossStyles GLGizmoEmboss::create_default_styles()
WxFontUtils::create_emboss_style(*wxITALIC_FONT, _u8L("ITALIC")), // A font using the wxFONTFAMILY_ROMAN family and wxFONTSTYLE_ITALIC style and of the same size of wxNORMAL_FONT.
WxFontUtils::create_emboss_style(*wxSWISS_FONT, _u8L("SWISS")), // A font identic to wxNORMAL_FONT except for the family used which is wxFONTFAMILY_SWISS.
WxFontUtils::create_emboss_style(wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD), _u8L("MODERN"))
//, WxFontUtils::get_os_font() == wxNORMAL_FONT
};
}
@ -1098,11 +1097,6 @@ void GLGizmoEmboss::draw_window()
#ifdef ALLOW_DEBUG_MODE
if (ImGui::Button("re-process")) process();
if (ImGui::Button("add svg")) choose_svg_file();
if (ImGui::Button("use system font")) {
size_t font_index = m_style_items.size();
m_style_items.emplace_back(WxFontUtils::get_os_font());
bool loaded = load_style(font_index);
}
#endif // ALLOW_DEBUG_MODE
bool is_activ_font = m_style_manager.is_activ_font();

View File

@ -1,5 +1,6 @@
#include "WxFontUtils.hpp"
#include <boost/assign.hpp>
#include <boost/log/trivial.hpp>
#if defined(__APPLE__)
#include <CoreText/CTFont.h>
@ -141,14 +142,16 @@ EmbossStyle WxFontUtils::create_emboss_style(const wxFont &font, const std::stri
return { name_item, fontDesc, type, font_prop };
}
EmbossStyle WxFontUtils::get_os_font()
{
wxSystemFont system_font = wxSYS_DEFAULT_GUI_FONT;
wxFont font = wxSystemSettings::GetFont(system_font);
EmbossStyle es = create_emboss_style(font);
es.name += std::string(" (OS default)");
return es;
}
// NOT working on linux GTK2
// load font used by Operating system as default GUI
//EmbossStyle WxFontUtils::get_os_font()
//{
// wxSystemFont system_font = wxSYS_DEFAULT_GUI_FONT;
// wxFont font = wxSystemSettings::GetFont(system_font);
// EmbossStyle es = create_emboss_style(font);
// es.name += std::string(" (OS default)");
// return es;
//}
std::string WxFontUtils::get_human_readable_name(const wxFont &font)
{

View File

@ -28,7 +28,6 @@ public:
static EmbossStyle create_emboss_style(const wxFont &font, const std::string& name = "");
// load font used by Operating system as default GUI
static EmbossStyle get_os_font();
static std::string get_human_readable_name(const wxFont &font);
// serialize / deserialize font