From 508d08c6871e0eaecb888f043846b57e733198a8 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Wed, 3 Jul 2024 20:35:46 -0700 Subject: [PATCH] Revert "Fix #122808: Better Indication of Missing VFont" This reverts commit ff89e24bf5de8db9a5119a696789d154beb6f943. --- source/blender/blenkernel/intern/vfont.cc | 12 ------------ .../blender/blenkernel/intern/vfontdata_freetype.cc | 5 +---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/source/blender/blenkernel/intern/vfont.cc b/source/blender/blenkernel/intern/vfont.cc index 2d5a76f99e1..c83d2164b6f 100644 --- a/source/blender/blenkernel/intern/vfont.cc +++ b/source/blender/blenkernel/intern/vfont.cc @@ -39,7 +39,6 @@ #include "BKE_anim_path.h" #include "BKE_bpath.hh" -#include "BKE_context.hh" #include "BKE_curve.hh" #include "BKE_global.hh" #include "BKE_idtype.hh" @@ -47,7 +46,6 @@ #include "BKE_main.hh" #include "BKE_object_types.hh" #include "BKE_packedFile.h" -#include "BKE_report.hh" #include "BKE_vfont.hh" #include "BKE_vfontdata.hh" @@ -302,16 +300,6 @@ static VFontData *vfont_get_data(VFont *vfont) if (!pf) { CLOG_WARN(&LOG, "Font file doesn't exist: %s", vfont->filepath); - if (!G.background) { - bContext *C_temp = CTX_create(); - wmWindowManager *wm = static_cast(G_MAIN->wm.first); - if (wm) { - CTX_wm_manager_set(C_temp, wm); - BKE_reportf(CTX_wm_reports(C_temp), RPT_ERROR, "Missing font: %s", vfont->filepath); - } - CTX_free(C_temp); - } - /* DON'T DO THIS * missing file shouldn't modify path! - campbell */ #if 0 diff --git a/source/blender/blenkernel/intern/vfontdata_freetype.cc b/source/blender/blenkernel/intern/vfontdata_freetype.cc index cf7f114ab17..0f83986a078 100644 --- a/source/blender/blenkernel/intern/vfontdata_freetype.cc +++ b/source/blender/blenkernel/intern/vfontdata_freetype.cc @@ -93,10 +93,7 @@ VChar *BKE_vfontdata_char_from_freetypefont(VFont *vfont, ulong character) } if (font_id == -1) { - /* This could happen for a saved file with unpacked local font, later - * removed. Load the default UI font so we can still show _something_. */ - font_id = BLF_load_mem( - vfont->data->name, static_cast(builtin_font_data), builtin_font_size); + return nullptr; } VChar *che = (VChar *)MEM_callocN(sizeof(VChar), "objfnt_char");