From 0067a8edc206f5d9ab7d7270964f930c6f8ac941 Mon Sep 17 00:00:00 2001 From: _Bastler <_Bastler@bstly.de> Date: Tue, 14 Sep 2021 11:44:45 +0200 Subject: [PATCH] fix external resources for twemoji --- front/src/Components/EmoteMenu/EmoteMenu.svelte | 8 ++++---- front/src/Phaser/Entity/Character.ts | 2 +- front/style/fonts.scss | 2 +- front/style/style.scss | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/front/src/Components/EmoteMenu/EmoteMenu.svelte b/front/src/Components/EmoteMenu/EmoteMenu.svelte index cf36c150..a1a81615 100644 --- a/front/src/Components/EmoteMenu/EmoteMenu.svelte +++ b/front/src/Components/EmoteMenu/EmoteMenu.svelte @@ -13,7 +13,6 @@ onMount(() => { picker = new EmojiButton({ rootElement: emojiContainer, - style : 'twemoji', styleProperties: { '--font': 'Press Start 2P' }, @@ -58,9 +57,10 @@ height: 100%; justify-content: center; align-items: center; + + .emote-menu { + pointer-events: all; + } } - .emote-menu { - pointer-events: all; - } \ No newline at end of file diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 2dfc3c90..b0433b39 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -293,7 +293,7 @@ export abstract class Character extends Container { this.cancelPreviousEmote(); const emoteY = -45; this.playerName.setVisible(false); - this.emote = new Text(this.scene, -10, 0, emote, { fontFamily: '"twemoji"', fontSize: '20px' }); + this.emote = new Text(this.scene, -10, 0, emote, { fontFamily: '"Twemoji Mozilla"', fontSize: '20px' }); this.emote.setAlpha(0); this.add(this.emote); this.createStartTransition(emoteY); diff --git a/front/style/fonts.scss b/front/style/fonts.scss index 7cade427..58761bd5 100644 --- a/front/style/fonts.scss +++ b/front/style/fonts.scss @@ -1,7 +1,7 @@ @import "~@fontsource/press-start-2p/index.css"; @font-face { - font-family: twemoji; + font-family: "Twemoji Mozilla"; src: url("./fonts/TwemojiMozilla.ttf") format('truetype'); } diff --git a/front/style/style.scss b/front/style/style.scss index 94085d64..d7871d7a 100644 --- a/front/style/style.scss +++ b/front/style/style.scss @@ -1113,3 +1113,7 @@ div.is-silent { div.is-silent.hide { right: 15px; } + +.emote-menu .emoji-picker .emoji-picker__emoji { + font-family: "Twemoji Mozilla" !important; +}