From ee187f2f782936d5e634e71f581acc46f16b8e54 Mon Sep 17 00:00:00 2001 From: "liz.li" Date: Fri, 25 Nov 2022 16:29:52 +0800 Subject: [PATCH] FIX: macos crash : .dfont file cannot load into imgui Change-Id: I0efd73da821afbb5e0cea314c56d8243342adb32 --- src/libslic3r/Shape/TextShape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/Shape/TextShape.cpp b/src/libslic3r/Shape/TextShape.cpp index dbe69a880d..7d37053ef9 100644 --- a/src/libslic3r/Shape/TextShape.cpp +++ b/src/libslic3r/Shape/TextShape.cpp @@ -77,7 +77,7 @@ std::vector init_occt_fonts() Handle(Font_SystemFont) sys_font = aFontMgr->GetFont(afn->ToCString()); TCollection_AsciiString font_path = sys_font->FontPath(Font_FontAspect::Font_FontAspect_Regular); - if (!font_path.IsEmpty()) { + if (!font_path.IsEmpty() && !font_path.EndsWith(".dfont")) { g_occt_fonts_maps.insert(std::make_pair(afn->ToCString(), decode_path(font_path.ToCString()))); stdFontNames.push_back(afn->ToCString()); }