Skip to content

Commit

Permalink
Fix font file load issue
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Jan 22, 2024
1 parent c5cb298 commit 002a405
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ Tips:
- `Ctrl + c` to quit.
";

let font = FIGfont::from_file("src/resources/univers.flf").unwrap();
const UNIVERS_FONT: &[u8] = include_bytes!("../resources/univers.flf");
let font = FIGfont::from_content(&String::from_utf8_lossy(UNIVERS_FONT)).unwrap();
let figure = font.convert(POLKADOT_CLI);
if let Some(figure) = figure {
println!("{}", figure);
Expand Down

0 comments on commit 002a405

Please sign in to comment.