Browse Source

textium: fonts should not own a texture

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

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

@ -4,15 +4,15 @@ use rusttype;
use std::collections::HashMap; use std::collections::HashMap;
use ::{FontTexture, FontAtlas, GlyphMetadata};
use ::{FontAtlas, GlyphMetadata};
use ::geometry::Rect; use ::geometry::Rect;
use ::texture::{Buffer2d, Bitmap}; use ::texture::{Buffer2d, Bitmap};
use ::packer::{Packer, GrowingPacker, SkylinePacker}; use ::packer::{Packer, GrowingPacker, SkylinePacker};
/// Wraps a rusttype font and provides atlas packing and rasterization functions. /// Wraps a rusttype font and provides atlas packing and rasterization functions.
#[derive(Clone)]
pub struct Font<'a> { pub struct Font<'a> {
font: rusttype::Font<'a>, font: rusttype::Font<'a>,
texture: Option<FontTexture>,
} }
#[allow(dead_code)] #[allow(dead_code)]
@ -21,7 +21,6 @@ impl<'a> Font<'a> {
pub fn new(rt_font: rusttype::Font<'a>) -> Font { pub fn new(rt_font: rusttype::Font<'a>) -> Font {
Font { Font {
font: rt_font, font: rt_font,
texture: None,
} }
} }


Loading…
Cancel
Save