Return Vec from get_last_resort_font_families.

This commit is contained in:
Ms2ger 2014-05-06 20:38:07 +02:00
parent b6e2a9aa78
commit 54499536d9
4 changed files with 9 additions and 10 deletions

View file

@ -18,7 +18,7 @@ pub type FontFamilyMap = HashMap<~str, FontFamily>;
trait FontListHandleMethods { trait FontListHandleMethods {
fn get_available_families(&self, fctx: &FontContextHandle) -> FontFamilyMap; fn get_available_families(&self, fctx: &FontContextHandle) -> FontFamilyMap;
fn load_variations_for_family(&self, family: &mut FontFamily); fn load_variations_for_family(&self, family: &mut FontFamily);
fn get_last_resort_font_families() -> ~[~str]; fn get_last_resort_font_families() -> Vec<~str>;
} }
/// The platform-independent font list abstraction. /// The platform-independent font list abstraction.
@ -75,9 +75,8 @@ impl FontList {
} }
} }
pub fn get_last_resort_font_families() -> ~[~str] { pub fn get_last_resort_font_families() -> Vec<~str> {
let last_resort = FontListHandle::get_last_resort_font_families(); FontListHandle::get_last_resort_font_families()
last_resort
} }
} }

View file

@ -129,8 +129,8 @@ impl FontListHandle {
} }
} }
pub fn get_last_resort_font_families() -> ~[~str] { pub fn get_last_resort_font_families() -> Vec<~str> {
~["Roboto".to_owned()] vec!("Roboto".to_owned())
} }
} }

View file

@ -131,8 +131,8 @@ impl FontListHandle {
} }
} }
pub fn get_last_resort_font_families() -> ~[~str] { pub fn get_last_resort_font_families() -> Vec<~str> {
~["Arial".to_owned()] vec!("Arial".to_owned())
} }
} }

View file

@ -58,7 +58,7 @@ impl FontListHandle {
} }
} }
pub fn get_last_resort_font_families() -> ~[~str] { pub fn get_last_resort_font_families() -> Vec<~str> {
~["Arial Unicode MS".to_owned(),"Arial".to_owned()] vec!("Arial Unicode MS".to_owned(), "Arial".to_owned())
} }
} }