Skip to content

Commit

Permalink
Run
Browse files Browse the repository at this point in the history
  • Loading branch information
jsatka committed Jul 26, 2023
1 parent d3e2452 commit d02243b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/fonts.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
use bevy::prelude::*;
use bevy_iced::iced::{Font, widget::{text, column}};
use bevy_iced::iced::{
widget::{column, text},
Font,
};
use bevy_iced::{IcedContext, IcedPlugin};

static ALPHAPROTA_FONT_BYTES: &'static [u8] = include_bytes!("../assets/fonts/AlphaProta.ttf");
static RAINBOW2000_FONT_BYTES: &'static [u8] = include_bytes!("../assets/fonts/Rainbow2000-Regular.ttf");
static RAINBOW2000_FONT_BYTES: &'static [u8] =
include_bytes!("../assets/fonts/Rainbow2000-Regular.ttf");

const ALPHAPROTA_FONT: Font = Font::with_name("Alpha Prota");
const RAINBOW2000_FONT: Font = Font::with_name("Rainbow 2000");
Expand All @@ -30,4 +34,4 @@ fn ui_system(mut ctx: IcedContext<UiMessage>) {
text(format!("I am the default font")),
text(format!("I am another font")).font(RAINBOW2000_FONT)
));
}
}

0 comments on commit d02243b

Please sign in to comment.