FIX: macos crash : .dfont file cannot load into imgui

Change-Id: I0efd73da821afbb5e0cea314c56d8243342adb32
This commit is contained in:
liz.li 2022-11-25 16:29:52 +08:00 committed by Lane.Wei
parent 9c55e42b32
commit ee187f2f78

View file

@ -77,7 +77,7 @@ std::vector<std::string> 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());
}