mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Add more weight of emoji font
For at least Chrome on Windows 10, we need to explicitly add additional weights for emoji to appear when bold.
This commit is contained in:
parent
e44f3b65e6
commit
11828c40e5
1 changed files with 4 additions and 3 deletions
|
@ -77,9 +77,10 @@ export async function fixupColorFonts() {
|
|||
}
|
||||
|
||||
if (await isColrFontSupported()) {
|
||||
const font = new FontFace("Twemoji",
|
||||
`url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2")}')`, {});
|
||||
document.fonts.add(font);
|
||||
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, { weight: 600 }));
|
||||
document.fonts.add(new FontFace("Twemoji", path, { weight: 700 }));
|
||||
}
|
||||
// if not supported, the browser will fall back to one of the native fonts specified.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue