unsafe fn handle_undefined<'a>(
    cmap: &CMap,
    inbuf: &mut &[u8],
    outbuf: &'a mut [u8],
) -> &'a mut [u8] {
    if outbuf.len() < 2 {
        panic!("{}: Buffer overflow.", "CMap");
    }
    match cmap.type_0 {
        1 => {
            outbuf[..2].copy_from_slice(b"\x00\x00");
        }
        2 => {
            outbuf[..2].copy_from_slice(b"\xff\xfd");
        }
        _ => {
            warn!(
                "Cannot handle undefined mapping for this type of CMap mapping: {}",
                cmap.type_0
            );
            warn!("<0000> is used for .notdef char.");
            outbuf[..2].fill(0);
        }
    }
    let len = bytes_consumed(cmap, *inbuf);
    *inbuf = &inbuf[len as usize..];
    &mut outbuf[2..]
}
/*
 * Put notdef chars for codes not declared in notdef(range|char)
 */
Put notdef chars for codes not declared in notdef(range|char)
Put notdef chars for codes not declared in notdef ( range|char )
unsafe fn handle_undefined<'a>(
    cmap: &CMap,
    inbuf: &mut &[u8],
    outbuf: &'a mut [u8],
) -> &'a mut [u8] {
    if outbuf.len() < 2 {
        panic!("{}: Buffer overflow.", "CMap");
    }
    match cmap.type_0 {
        1 => {
            outbuf[..2].copy_from_slice(b"\x00\x00");
        }
        2 => {
            outbuf[..2].copy_from_slice(b"\xff\xfd");
        }
        _ => {
            warn!(
                "Cannot handle undefined mapping for this type of CMap mapping: {}",
                cmap.type_0
            );
            warn!("<0000> is used for .notdef char.");
            outbuf[..2].fill(0);
        }
    }
    let len = bytes_consumed(cmap, *inbuf);
    *inbuf = &inbuf[len as usize..];
    &mut outbuf[2..]
}
unsafe fn handle_undefined < ' a > ( cmap : & CMap , inbuf : & mut & [ u8 ] , outbuf : & ' a mut [ u8 ] , ) -> & ' a mut [ u8 ] { if outbuf . len ( ) < 2 { panic ! ( " " " " ) ; } match cmap . type_0 { 1 => { outbuf [ .. 2 ] . copy_from_slice ( b" \x00 \x00 " ) ; } 2 => { outbuf [ .. 2 ] . copy_from_slice ( b" \xff \xfd " ) ; } _ => { warn ! ( " " cmap type_0 ) ; warn ! ( " " ) ; outbuf [ .. 2 ] . fill ( 0 ) ; } } let len = bytes_consumed ( cmap , * inbuf ) ; * inbuf = & inbuf [ len as usize .. ] ; & mut outbuf [ 2 .. ] }
Put notdef chars for codes not declared in notdef(range|char)
Put notdef chars for codes not declared in notdef ( range|char )
cmap
&CMap
inbuf
&mut &[u8]
outbuf
&'a mut [u8]