mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
servo: Remove unused font_cache.rs and font_list_handle.rs.
Source-Repo: https://github.com/servo/servo Source-Revision: a2589dbfec134ee25e3ea59b5b2a539d4a24d7df
This commit is contained in:
parent
34734ebf81
commit
23f70c60a8
@ -1,36 +0,0 @@
|
||||
/*
|
||||
use font::{Font, FontStyle, FontWeight300};
|
||||
use native::{FontHandle, FontContext};
|
||||
|
||||
// Font cache that reuses gfx::Font instances.
|
||||
|
||||
struct FontCache {
|
||||
fctx: @FontContext,
|
||||
mut cached_font: Option<@Font>
|
||||
}
|
||||
|
||||
impl FontCache {
|
||||
static pub fn new(fctx: @FontContext) -> FontCache {
|
||||
FontCache {
|
||||
fctx: fctx,
|
||||
cached_font: None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_test_font(@self) -> @Font {
|
||||
|
||||
|
||||
return match self.cached_font {
|
||||
Some(font) => font,
|
||||
None => match self.get_font(&dummy_style) {
|
||||
Ok(font) => { self.cached_font = Some(font); font }
|
||||
Err(*) => fail
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_font(@self, style: &FontStyle) -> Result<@Font, ()> {
|
||||
self.create_font(style)
|
||||
}
|
||||
}
|
||||
*/
|
Loading…
Reference in New Issue
Block a user