Merge pull request #3050 from matrix-org/matthew/sbix
add sbix fallback twemoji font (and bump to emoji 12)pull/21833/head
						commit
						1515f8de17
					
				
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -114,7 +114,13 @@ export async function fixupColorFonts() {
 | 
			
		|||
        // 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: 700 }));
 | 
			
		||||
    } else {
 | 
			
		||||
        // fall back to SBIX, generated via https://github.com/matrix-org/twemoji-colr/tree/matthew/sbix
 | 
			
		||||
        const path = `url('${require("../../res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.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.
 | 
			
		||||
    // ...and if SBIX is not supported, the browser will fall back to one of the native fonts specified.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue