fn char_spacing_between(
        &self,
        prev: &TextSpan,
        fonts: Option<&FontCache>,
    ) -> Result<u16> {
        if let Some(c) = self.state.char_spacing {
            Ok(c.into())
        } else {
            // NTCIP 1203 fontCharSpacing:
            // "... the average character spacing of the two fonts,
            // rounded up to the nearest whole pixel ..." ???
            let psc = prev.char_spacing_fonts(fonts)?;
            let sc = self.char_spacing_fonts(fonts)?;
            Ok(((psc + sc) >> 1) + ((psc + sc) & 1))
        }
    }
/// Get the char spacing from a previous span.
Get the char spacing from a previous span.
Get the char spacing from a previous span .
fn char_spacing_between(
        &self,
        prev: &TextSpan,
        fonts: Option<&FontCache>,
    ) -> Result<u16> {
        if let Some(c) = self.state.char_spacing {
            Ok(c.into())
        } else {
            // NTCIP 1203 fontCharSpacing:
            // "... the average character spacing of the two fonts,
            // rounded up to the nearest whole pixel ..." ???
            let psc = prev.char_spacing_fonts(fonts)?;
            let sc = self.char_spacing_fonts(fonts)?;
            Ok(((psc + sc) >> 1) + ((psc + sc) & 1))
        }
    }
fn char_spacing_between ( & self , prev : & TextSpan , fonts : Option < & FontCache > , ) -> Result < u16 > { if let Some ( c ) = self . state . char_spacing { Ok ( c . into ( ) ) } else { // NTCIP 1203 fontCharSpacing: // "... the average character spacing of the two fonts, // rounded up to the nearest whole pixel ..." ??? let psc = prev . char_spacing_fonts ( fonts ) ? ; let sc = self . char_spacing_fonts ( fonts ) ? ; Ok ( ( ( psc + sc ) >> 1 ) + ( ( psc + sc ) & 1 ) ) } }
Get the char spacing from a previous span.
Get the char spacing from a previous span .
&self
prev
&TextSpan
fonts
Option<&FontCache>