mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Merge pull request #270 from CarterLi/master
Font: suppress IO when detecting fonts on macOS
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user