Add browser comment to extra fonts
This commit is contained in:
parent
e01a6ce24c
commit
c9300650ed
1 changed files with 2 additions and 0 deletions
|
@ -79,6 +79,8 @@ export async function fixupColorFonts() {
|
||||||
if (await isColrFontSupported()) {
|
if (await isColrFontSupported()) {
|
||||||
const path = `url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2")}')`;
|
const path = `url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2")}')`;
|
||||||
document.fonts.add(new FontFace("Twemoji", path, {}));
|
document.fonts.add(new FontFace("Twemoji", path, {}));
|
||||||
|
// For at least Chrome on Windows 10, we have to explictly add extra
|
||||||
|
// weights for the emoji to appear in bold messages, etc.
|
||||||
document.fonts.add(new FontFace("Twemoji", path, { weight: 600 }));
|
document.fonts.add(new FontFace("Twemoji", path, { weight: 600 }));
|
||||||
document.fonts.add(new FontFace("Twemoji", path, { weight: 700 }));
|
document.fonts.add(new FontFace("Twemoji", path, { weight: 700 }));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue