Skip to content

Commit

Permalink
include fonts for example
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed May 4, 2024
1 parent 4168f77 commit f1726f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Binary file added examples/fonts/Arial.ttf
Binary file not shown.
Binary file added examples/fonts/Hack.ttf
Binary file not shown.
Binary file added examples/fonts/Times.ttf
Binary file not shown.
10 changes: 5 additions & 5 deletions examples/text.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ function setup()
createWindow(600, 600);

-- Replace these with your font paths
font_arial = loadFont("/usr/share/fonts/TTF/Arial.TTF");
font_times = loadFont("/usr/share/fonts/TTF/Times.TTF");
font_georgia = loadFont("/usr/share/fonts/TTF/Georgia.TTF");
font_arial = loadFont("./examples/fonts/Arial.ttf");
font_times = loadFont("./examples/fonts/Times.ttf");
font_hack = loadFont("./examples/fonts/Hack.ttf");
end

function draw()
Expand All @@ -29,11 +29,11 @@ function draw()
textSize(22);
text('And this is some smaller text', 30, 70);

textFont(font_georgia);
textFont(font_hack);
fill(255, 40, 190);

textSize(32);
text('This is Georgia', 30, 100);
text('This is the Hack font', 30, 100);

textSize(22);
text('Same as above but smaller', 30, 120);
Expand Down

0 comments on commit f1726f9

Please sign in to comment.