Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 42e1805

Browse files
authored
Merge pull request #11684 from matrix-org/backport-11673-to-staging
[Backport staging] Fix Emoji font on Safari 17
2 parents 81c62e5 + a3fc8c6 commit 42e1805

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/FontManager.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ function safariVersionCheck(ua: string): boolean {
3131
const safariVersionStr = safariVersionMatch[2];
3232
const macOSVersion = macOSVersionStr.split("_").map((n) => parseInt(n, 10));
3333
const safariVersion = safariVersionStr.split(".").map((n) => parseInt(n, 10));
34-
const colrFontSupported = macOSVersion[0] >= 10 && macOSVersion[1] >= 14 && safariVersion[0] >= 12;
35-
// https://www.colorfonts.wtf/ states safari supports COLR fonts from this version on
34+
const colrFontSupported =
35+
macOSVersion[0] >= 10 && macOSVersion[1] >= 14 && safariVersion[0] >= 12 && safariVersion[0] < 17;
36+
// https://www.colorfonts.wtf/ states Safari supports COLR fonts from this version on but Safari 17 breaks it
3637
logger.log(
37-
`COLR support on Safari requires macOS 10.14 and Safari 12, ` +
38+
`COLR support on Safari requires macOS 10.14 and Safari 12-16, ` +
3839
`detected Safari ${safariVersionStr} on macOS ${macOSVersionStr}, ` +
3940
`COLR supported: ${colrFontSupported}`,
4041
);

0 commit comments

Comments
 (0)