Skip to content

Commit

Permalink
Add pixeloid font to the pixel theme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianoratamero committed Aug 13, 2024
1 parent 43c6f88 commit 5ce574c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Binary file added src/lib/fonts/PixeloidMono.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions src/routes/twitch-chat/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
// @ts-ignore
import PixeloidMono from '$lib/fonts/PixeloidMono.ttf';
import ComfyJS, { type OnMessageExtra } from 'comfy.js';
import { onMount } from 'svelte';
// @ts-ignore
Expand Down Expand Up @@ -617,6 +618,8 @@
});
</script>

<link rel="preload" href={PixeloidMono} as="font" type="font/ttf" crossorigin="anonymous" />

{#if error}
<div>Channel not found :\ Please put the channel name as the `channel` search parameter.</div>
{/if}
Expand All @@ -628,3 +631,13 @@
</div>
{/each}
</div>

<style>
@font-face {
font-family: 'Pixeloid Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('$lib/fonts/PixeloidMono.ttf') format('ttf');
}
</style>
3 changes: 1 addition & 2 deletions src/routes/twitch-chat/themes/pixel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@
#chat.pixel {
@apply gap-2;
& .message {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
'Courier New', monospace;
font-family: 'Pixeloid Mono', ui-monospace, monospace;

@apply font-bold;
@apply bg-black;
Expand Down

0 comments on commit 5ce574c

Please sign in to comment.