Skip to content

Commit

Permalink
Make text look more crispy
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMurray committed Apr 1, 2021
1 parent 608f047 commit 0bde814
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Binary file added BebasNeue-Regular.ttf
Binary file not shown.
13 changes: 10 additions & 3 deletions src/app.rs
Expand Up @@ -80,8 +80,14 @@ impl App {
}

fn draw_text(&self, ctx: &mut Context, s: &str, x: f32, y: f32) -> GameResult<()> {
let text = Text::new((s, self.font, 12.5));
graphics::draw(ctx, &text, DrawParam::default().dest(Point2 { x: x, y: y }))
let text = Text::new((s, self.font, 25.0));
graphics::draw(
ctx,
&text,
DrawParam::default()
.scale([0.5, 0.5])
.dest(Point2 { x: x, y: y }),
)
}

fn draw_text_with_color(
Expand All @@ -92,11 +98,12 @@ impl App {
y: f32,
color: Color,
) -> GameResult<()> {
let text = Text::new((s, self.font, 12.5));
let text = Text::new((s, self.font, 25.0));
graphics::draw(
ctx,
&text,
DrawParam::default()
.scale([0.5, 0.5])
.dest(Point2 { x: x, y: y })
.color(color),
)
Expand Down

0 comments on commit 0bde814

Please sign in to comment.