fn cascade_list_for_languages(ct_font: &CTFont, languages: &[String]) -> Vec<Descriptor> {
    // convert language type &Vec<String> -> CFArray
    let langarr: CFArray<CFString> = {
        let tmp: Vec<CFString> =
            languages.iter().map(|language| CFString::new(&language)).collect();
        CFArray::from_CFTypes(&tmp)
    };

    // CFArray of CTFontDescriptorRef (again)
    let list = ct_cascade_list_for_languages(ct_font, &langarr);

    // convert CFArray to Vec<Descriptor>
    list.into_iter().map(|fontdesc| Descriptor::new(fontdesc.clone())).collect()
}
/// Return fallback descriptors for font/language list
Return fallback descriptors for font/language list
Return fallback descriptors for font / language list
fn cascade_list_for_languages(ct_font: &CTFont, languages: &[String]) -> Vec<Descriptor> {
    // convert language type &Vec<String> -> CFArray
    let langarr: CFArray<CFString> = {
        let tmp: Vec<CFString> =
            languages.iter().map(|language| CFString::new(&language)).collect();
        CFArray::from_CFTypes(&tmp)
    };
    // CFArray of CTFontDescriptorRef (again)
    let list = ct_cascade_list_for_languages(ct_font, &langarr);
    // convert CFArray to Vec<Descriptor>
    list.into_iter().map(|fontdesc| Descriptor::new(fontdesc.clone())).collect()
}
fn cascade_list_for_languages ( ct_font : & CTFont , languages : & [ String ] ) -> Vec < Descriptor > { // convert language type &Vec<String> -> CFArray let langarr : CFArray < CFString > = { let tmp : Vec < CFString > = languages . iter ( ) . map ( | language | CFString :: new ( & language ) ) . collect ( ) ; CFArray :: from_CFTypes ( & tmp ) } ; // CFArray of CTFontDescriptorRef (again) let list = ct_cascade_list_for_languages ( ct_font , & langarr ) ; // convert CFArray to Vec<Descriptor> list . into_iter ( ) . map ( | fontdesc | Descriptor :: new ( fontdesc . clone ( ) ) ) . collect ( ) }
Return fallback descriptors for font/language list
Return fallback descriptors for font / language list
ct_font
&CTFont
languages
&[String]