Skip to content

Commit

Permalink
feat: 引数で印字する文字を指定できるようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
apple-yagi committed Jan 13, 2024
1 parent 14c46de commit 80eaa6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
use std::env;

use image::{ImageBuffer, Rgba};
use imageproc::drawing::draw_text_mut;
use rusttype::{point, Font, Rect, Scale};

fn main() {
let args: Vec<String> = env::args().collect();
let text = &args[2];

let imgx = 500;
let imgy = 500;

Expand All @@ -15,8 +20,6 @@ fn main() {
let font = Vec::from(include_bytes!("../fonts/NotoSansJP-Bold.ttf") as &[u8]);
let font = Font::try_from_vec(font).unwrap();

let text = "完全に理解した";

let mut scale = Scale { x: 350.0, y: 350.0 };
for _ in 0..100 {
let glyphs: Vec<Rect<i32>> = font
Expand Down

0 comments on commit 80eaa6d

Please sign in to comment.