fn width(&self, fonts: Option<&FontCache>) -> Result<u16> {
        let font = self.state.font(fonts)?;
        let cs = self.char_spacing_fonts(fonts)?;
        Ok(font.text_width(&self.text, Some(cs))?)
    }
/// Get the width of a text span.
Get the width of a text span.
Get the width of a text span .
fn width(&self, fonts: Option<&FontCache>) -> Result<u16> {
        let font = self.state.font(fonts)?;
        let cs = self.char_spacing_fonts(fonts)?;
        Ok(font.text_width(&self.text, Some(cs))?)
    }
fn width ( & self , fonts : Option < & FontCache > ) -> Result < u16 > { let font = self . state . font ( fonts ) ? ; let cs = self . char_spacing_fonts ( fonts ) ? ; Ok ( font . text_width ( & self . text , Some ( cs ) ) ? ) }
Get the width of a text span.
Get the width of a text span .
&self
fonts
Option<&FontCache>