You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
remove SBIX font and fallback to native emoji
This commit is contained in:
Binary file not shown.
@@ -75,15 +75,11 @@ export async function fixupColorFonts() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we programatically add the right fontface.
|
|
||||||
let font;
|
|
||||||
if (await isColrFontSupported()) {
|
if (await isColrFontSupported()) {
|
||||||
font = new FontFace("Twemoji",
|
const font = new FontFace("Twemoji",
|
||||||
`url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2")}')`, {});
|
`url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2")}')`, {});
|
||||||
} else {
|
|
||||||
font = new FontFace("Twemoji",
|
|
||||||
`url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2")}')`, {});
|
|
||||||
}
|
|
||||||
document.fonts.add(font);
|
document.fonts.add(font);
|
||||||
|
}
|
||||||
|
// if not supported, the browser will fall back to one of the native fonts specified.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user