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 {
fn get_available_families(&self, fctx: &FontContextHandle) -> FontFamilyMap;
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.
@ -75,9 +75,8 @@ impl FontList {
}
}
pub fn get_last_resort_font_families() -> ~[~str] {
let last_resort = FontListHandle::get_last_resort_font_families();
last_resort
pub fn get_last_resort_font_families() -> Vec<~str> {
FontListHandle::get_last_resort_font_families()
}
}

View file

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

View file

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

View file

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