|
@ -23,7 +23,7 @@ fn main() { |
|
|
let font = textium::Font::new(font);
|
|
|
let font = textium::Font::new(font);
|
|
|
|
|
|
|
|
|
let chrs = ASCII.iter().cloned().chain(ASCII.iter().cloned());
|
|
|
let chrs = ASCII.iter().cloned().chain(ASCII.iter().cloned());
|
|
|
let (_, bitmap, _) = font.make_atlas(chrs, 20.0, 1, 256, 128);
|
|
|
|
|
|
|
|
|
let (_, bitmap, _) = font.make_atlas(chrs, 64.0, 1, 256, 128);
|
|
|
|
|
|
|
|
|
let img: ImageBuffer<Luma<u8>, _> = ImageBuffer::from_raw(bitmap.width() as u32, bitmap.height() as u32, bitmap.raw()).unwrap();
|
|
|
let img: ImageBuffer<Luma<u8>, _> = ImageBuffer::from_raw(bitmap.width() as u32, bitmap.height() as u32, bitmap.raw()).unwrap();
|
|
|
let _ = img.save(&Path::new("atlas.png"));
|
|
|
let _ = img.save(&Path::new("atlas.png"));
|
|
|