pub(crate) unsafe fn vf_locate_font(tex_name: &str, ptsize: spt_t) -> i32 {
    /* Has this name and ptsize already been loaded as a VF? */
    let mut i = 0;
    while i < vf_fonts.len() {
        if vf_fonts[i].tex_name == tex_name && vf_fonts[i].ptsize == ptsize {
            break;
        }
        i += 1;
    }
    if i != vf_fonts.len() {
        return i as i32;
    }
    if let Some(vf_handle) = InFile::open(tex_name, TTInputFormat::VF, 0)
        .or_else(|| InFile::open(tex_name, TTInputFormat::OVF, 0))
    {
        if verbose as i32 == 1 {
            eprint!("(VF:{}", tex_name);
        }
        let thisfont = vf_fonts.len();
        /* Initialize some pointers and such */
        vf_fonts.push(vf {
            tex_name: tex_name.to_string(),
            ptsize,
            design_size: 0,
            dev_fonts: Vec::new(),
            ch_pkt: Vec::new(),
        });
        read_header(&mut &vf_handle, thisfont as i32);
        process_vf_file(&mut &vf_handle, thisfont as i32);
        if verbose != 0 {
            eprint!(")");
        }
        thisfont as i32
    } else {
        -1
    }
}
/* Global variables such as num_vf_fonts require careful attention */
Global variables such as num_vf_fonts require careful attention
Global variables such as num_vf_fonts require careful attention
pub(crate) unsafe fn vf_locate_font(tex_name: &str, ptsize: spt_t) -> i32 {
    /* Has this name and ptsize already been loaded as a VF? */
    let mut i = 0;
    while i < vf_fonts.len() {
        if vf_fonts[i].tex_name == tex_name && vf_fonts[i].ptsize == ptsize {
            break;
        }
        i += 1;
    }
    if i != vf_fonts.len() {
        return i as i32;
    }
    if let Some(vf_handle) = InFile::open(tex_name, TTInputFormat::VF, 0)
        .or_else(|| InFile::open(tex_name, TTInputFormat::OVF, 0))
    {
        if verbose as i32 == 1 {
            eprint!("(VF:{}", tex_name);
        }
        let thisfont = vf_fonts.len();
        /* Initialize some pointers and such */
        vf_fonts.push(vf {
            tex_name: tex_name.to_string(),
            ptsize,
            design_size: 0,
            dev_fonts: Vec::new(),
            ch_pkt: Vec::new(),
        });
        read_header(&mut &vf_handle, thisfont as i32);
        process_vf_file(&mut &vf_handle, thisfont as i32);
        if verbose != 0 {
            eprint!(")");
        }
        thisfont as i32
    } else {
        -1
    }
}
pub ( crate ) unsafe fn vf_locate_font ( tex_name : & str , ptsize : spt_t ) -> i32 { /* Has this name and ptsize already been loaded as a VF? */ let mut i = 0 ; while i < vf_fonts . len ( ) { if vf_fonts [ i ] . tex_name == tex_name && vf_fonts [ i ] . ptsize == ptsize { break ; } i += 1 ; } if i != vf_fonts . len ( ) { return i as i32 ; } if let Some ( vf_handle ) = InFile :: open ( tex_name , TTInputFormat :: VF , 0 ) . or_else ( | | InFile :: open ( tex_name , TTInputFormat :: OVF , 0 ) ) { if verbose as i32 == 1 { eprint ! ( " " tex_name ) ; } let thisfont = vf_fonts . len ( ) ; /* Initialize some pointers and such */ vf_fonts . push ( vf { tex_name : tex_name . to_string ( ) , ptsize , design_size : 0 , dev_fonts : Vec :: new ( ) , ch_pkt : Vec :: new ( ) , } ) ; read_header ( & mut & vf_handle , thisfont as i32 ) ; process_vf_file ( & mut & vf_handle , thisfont as i32 ) ; if verbose != 0 { eprint ! ( " " ) ; } thisfont as i32 } else { - 1 } }
Global variables such as num_vf_fonts require careful attention
Global variables such as num_vf_fonts require careful attention
tex_name
&str
ptsize
spt_t