From 6cfb74b2468bf19d4dfca170bb63cbae917dd061 Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 18 Aug 2017 22:50:24 -0500 Subject: [PATCH] textium: fonts should not own a texture --- textium/src/rasterizer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/textium/src/rasterizer.rs b/textium/src/rasterizer.rs index 74ec295..647b1e2 100644 --- a/textium/src/rasterizer.rs +++ b/textium/src/rasterizer.rs @@ -4,15 +4,15 @@ use rusttype; use std::collections::HashMap; -use ::{FontTexture, FontAtlas, GlyphMetadata}; +use ::{FontAtlas, GlyphMetadata}; use ::geometry::Rect; use ::texture::{Buffer2d, Bitmap}; use ::packer::{Packer, GrowingPacker, SkylinePacker}; /// Wraps a rusttype font and provides atlas packing and rasterization functions. +#[derive(Clone)] pub struct Font<'a> { font: rusttype::Font<'a>, - texture: Option, } #[allow(dead_code)] @@ -21,7 +21,6 @@ impl<'a> Font<'a> { pub fn new(rt_font: rusttype::Font<'a>) -> Font { Font { font: rt_font, - texture: None, } }