Skip to content

Commit 6b691ce

Browse files
committed
less spammy mupdf log
1 parent 6fee592 commit 6b691ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/EngineMupdf.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,14 @@ static void fz_unlock_context_cs(void* user, int lock) {
15741574
}
15751575

15761576
static void fz_print_cb(void* user, const char* msg) {
1577+
static AtomicBool seenMsg;
1578+
if (str::Contains(msg, "generic error: couldn't find system font 'serif'")) {
1579+
// this floods the log in some files
1580+
if (seenMsg.Get()) {
1581+
return;
1582+
}
1583+
seenMsg.Set(true);
1584+
}
15771585
if (!str::EndsWith(msg, "\n")) {
15781586
msg = str::JoinTemp(msg, "\n");
15791587
}

0 commit comments

Comments
 (0)