Skip to content

Commit

Permalink
Use Geist Mono font for "starwars" demo
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 29, 2023
1 parent 85ee6e5 commit a3674df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file added apps/starwars/romfs/GeistMono-Regular.otf
Binary file not shown.
Binary file removed apps/starwars/romfs/Hack-Regular.ttf
Binary file not shown.
6 changes: 3 additions & 3 deletions apps/starwars/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import stripAnsi from 'strip-ansi';

const fontData = Switch.readFileSync(
new URL('Hack-Regular.ttf', Switch.entrypoint)
new URL('GeistMono-Regular.otf', Switch.entrypoint)
);
const font = new FontFace('Hack', fontData);
const font = new FontFace('Geist Mono', fontData);
Switch.fonts.add(font);

function fdToStream(fd: number) {
Expand Down Expand Up @@ -54,7 +54,7 @@ async function main() {
const ctx = Switch.screen.getContext('2d');
const fontSize = 30.83;
const yOffset = 180;
ctx.font = `${fontSize}px Hack`;
ctx.font = `${fontSize}px "Geist Mono"`;

// dump the movie to the console
let lineCount = 0;
Expand Down

0 comments on commit a3674df

Please sign in to comment.