diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index 0bd06cf8d..d1e5eb0d8 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -848,7 +848,7 @@ std::unique_ptr Emboss::create_font_file(HFONT hfont) HDC hdc = ::CreateCompatibleDC(NULL); if (hdc == NULL) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Can't create HDC by CreateCompatibleDC(NULL)." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Can't create HDC by CreateCompatibleDC(NULL)."; return nullptr; } @@ -863,7 +863,7 @@ std::unique_ptr Emboss::create_font_file(HFONT hfont) ::DeleteDC(hdc); if (size != loaded_size) { assert(false); - // BOOST_LOG_TRIVIAL(error) << "Different loaded(from HFONT) data size." << std::endl; + BOOST_LOG_TRIVIAL(error) << "Different loaded(from HFONT) data size."; return nullptr; } return create_font_file(std::move(buffer)); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index da87a795a..9b2baa4e9 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -1338,6 +1338,9 @@ void GLGizmoEmboss::init_face_names() { if (m_face_names.is_init) return; m_face_names.is_init = true; + // to reload fonts from system, when install new one + wxFontEnumerator::InvalidateCache(); + auto create_truncated_names = [&facenames = m_face_names, &width = m_gui_cfg->face_name_max_width]() { for (FaceName &face : facenames.faces) { std::string name_str(face.wx_name.ToUTF8().data()); @@ -1374,9 +1377,9 @@ void GLGizmoEmboss::init_face_names() { return; } - BOOST_LOG_TRIVIAL(info) << (m_face_names.hash == 0) ? + BOOST_LOG_TRIVIAL(info) << ((m_face_names.hash == 0) ? "FontName list is generate from scratch." : - "Hash are different. Only previous bad fonts are used and set again as bad"; + "Hash are different. Only previous bad fonts are used and set again as bad"); m_face_names.hash = hash; // validation lambda