Skip to content

Commit 265254d

Browse files
Merge pull request #270 from CarterLi/master
Font: suppress IO when detecting fonts on macOS
2 parents 287ba33 + 946154d commit 265254d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/detection/font/font_apple.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "common/font.h"
2+
#include "common/io.h"
23
#include "util/apple/cf_helpers.h"
34
#include "font.h"
45

@@ -13,8 +14,10 @@ static void detectFontForType(CTFontUIFontType uiType, FFstrbuf* font)
1314
void ffDetectFontImpl(const FFinstance* instance, FFFontResult* result)
1415
{
1516
FF_UNUSED(instance);
17+
ffSuppressIO(true);
1618
detectFontForType(kCTFontUIFontSystem, &result->fonts[0]);
1719
detectFontForType(kCTFontUIFontUser, &result->fonts[1]);
1820
detectFontForType(kCTFontUIFontUserFixedPitch, &result->fonts[2]);
1921
detectFontForType(kCTFontUIFontApplication, &result->fonts[3]);
22+
ffSuppressIO(false);
2023
}

0 commit comments

Comments
 (0)