From 946154dbac00d51327568208b57190625d308fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 29 Sep 2022 22:06:43 +0800 Subject: [PATCH] Font: suppress IO when detecting fonts on macOS Removes * 2022-09-29 07:06:58.649 flashfetch[92995:31447779] XType: com.apple.fonts is not accessible. * 2022-09-29 07:06:58.649 flashfetch[92995:31447779] XType: XTFontStaticRegistry is enabled. --- src/detection/font/font_apple.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/detection/font/font_apple.m b/src/detection/font/font_apple.m index 1d75ec337..91689f6e9 100644 --- a/src/detection/font/font_apple.m +++ b/src/detection/font/font_apple.m @@ -1,4 +1,5 @@ #include "common/font.h" +#include "common/io.h" #include "util/apple/cf_helpers.h" #include "font.h" @@ -13,8 +14,10 @@ static void detectFontForType(CTFontUIFontType uiType, FFstrbuf* font) void ffDetectFontImpl(const FFinstance* instance, FFFontResult* result) { FF_UNUSED(instance); + ffSuppressIO(true); detectFontForType(kCTFontUIFontSystem, &result->fonts[0]); detectFontForType(kCTFontUIFontUser, &result->fonts[1]); detectFontForType(kCTFontUIFontUserFixedPitch, &result->fonts[2]); detectFontForType(kCTFontUIFontApplication, &result->fonts[3]); + ffSuppressIO(false); }