Browse Source

rasterizer: remove debug, add reminder to fix space packing

master
Erin 8 years ago
parent
commit
6b15380d1a
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      textium/src/rasterizer.rs

+ 2
- 3
textium/src/rasterizer.rs View File

@ -41,7 +41,8 @@ impl<'a> Font<'a> {
atlas.glyph_data.insert(chr, info);
} else if chr == ' ' {
// generate a blank pixel for the space texture
let (mut info, _) = self.rasterize_char(' ', scale).unwrap();
// TODO: this is bad and should be fixed
let (mut info, _) = self.rasterize_char('-', scale).unwrap();
let empty_bitmap = Bitmap::new(1, 1);
let r = packer.pack_resize(&empty_bitmap, |(w, h)| (w*2, h*2));
info.bounding_box = r;
@ -78,8 +79,6 @@ impl<'a> Font<'a> {
out.set(x as usize, y as usize, (v * 255.0) as u8);
});
println!("{:?}", bbox);
let data = GlyphMetadata {
scale: scale,
bounding_box: Rect {


Loading…
Cancel
Save