mirror of https://github.com/vector-im/riot-web
remove SBIX font and fallback to native emoji
parent
038cc45ee1
commit
ee86471691
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 {
|
document.fonts.add(font);
|
||||||
font = new FontFace("Twemoji",
|
|
||||||
`url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2")}')`, {});
|
|
||||||
}
|
}
|
||||||
document.fonts.add(font);
|
// if not supported, the browser will fall back to one of the native fonts specified.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue