fix external resources for twemoji

This commit is contained in:
_Bastler 2021-09-14 11:44:45 +02:00
parent 148540dafe
commit 0067a8edc2
4 changed files with 10 additions and 6 deletions

View File

@ -13,7 +13,6 @@
onMount(() => { onMount(() => {
picker = new EmojiButton({ picker = new EmojiButton({
rootElement: emojiContainer, rootElement: emojiContainer,
style : 'twemoji',
styleProperties: { styleProperties: {
'--font': 'Press Start 2P' '--font': 'Press Start 2P'
}, },
@ -58,9 +57,10 @@
height: 100%; height: 100%;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.emote-menu {
pointer-events: all;
}
} }
.emote-menu {
pointer-events: all;
}
</style> </style>

View File

@ -293,7 +293,7 @@ export abstract class Character extends Container {
this.cancelPreviousEmote(); this.cancelPreviousEmote();
const emoteY = -45; const emoteY = -45;
this.playerName.setVisible(false); 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.emote.setAlpha(0);
this.add(this.emote); this.add(this.emote);
this.createStartTransition(emoteY); this.createStartTransition(emoteY);

View File

@ -1,7 +1,7 @@
@import "~@fontsource/press-start-2p/index.css"; @import "~@fontsource/press-start-2p/index.css";
@font-face { @font-face {
font-family: twemoji; font-family: "Twemoji Mozilla";
src: url("./fonts/TwemojiMozilla.ttf") format('truetype'); src: url("./fonts/TwemojiMozilla.ttf") format('truetype');
} }

View File

@ -1113,3 +1113,7 @@ div.is-silent {
div.is-silent.hide { div.is-silent.hide {
right: 15px; right: 15px;
} }
.emote-menu .emoji-picker .emoji-picker__emoji {
font-family: "Twemoji Mozilla" !important;
}