remove SBIX font and fallback to native emoji

pull/21833/head
Bruno Windels 2019-05-22 13:06:04 +02:00
parent 038cc45ee1
commit ee86471691
2 changed files with 3 additions and 7 deletions

View File

@ -75,15 +75,11 @@ export async function fixupColorFonts() {
return;
}
// we programatically add the right fontface.
let font;
if (await isColrFontSupported()) {
font = new FontFace("Twemoji",
const font = new FontFace("Twemoji",
`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.
}