diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index c35853a735..1b510921b5 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -56,9 +56,12 @@ std::optional Private::load_font_info(const Emboss::Font &font) std::optional Private::get_glyph(stbtt_fontinfo &font_info, int unicode_letter, float flatness) { int glyph_index = stbtt_FindGlyphIndex(&font_info, unicode_letter); - if (glyph_index == 0) { - std::cerr << "Character codepoint(" << unicode_letter - << " = '" << (char) unicode_letter << "') is not defined in the font."; + if (glyph_index == 0) { + wchar_t wchar = static_cast(unicode_letter); + std::cerr << "Character unicode letter (" + << "decimal value = " << std::dec << unicode_letter << ", " + << "hexadecimal value = U+" << std::hex << unicode_letter << std::dec + << ") is NOT defined inside of the font. \n"; return {}; } @@ -522,7 +525,7 @@ std::optional Emboss::letter2glyph(const Font &font, { auto font_info_opt = Private::load_font_info(font); if (!font_info_opt.has_value()) return {}; - return Private::get_glyph(*font_info_opt, (int) letter, flatness); + return Private::get_glyph(*font_info_opt, letter, flatness); } ExPolygons Emboss::text2shapes(Font & font, diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index c4020526bf..c268f6d191 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -470,7 +470,7 @@ void GLGizmoEmboss::initialize() // TODO: What to do when icon was NOT loaded? bool success = init_icons(); - + assert(success); load_font_list(); @@ -1416,7 +1416,7 @@ std::string GLGizmoEmboss::create_volume_name() bool GLGizmoEmboss::init_icons() { - std::string path = resources_dir() + "/icons/white/"; + std::string path = resources_dir() + "/icons/"; // icon order has to match the enum IconType std::vector filenames = {path + "wrench.svg",