pub fn new(
        width: width::Spec,
        default_width: Length,
        kerning: kerning::Spec,
        default_kerning: Length,
    ) -> Result<Self> {
        let mut table = Subtable::new();

        let default = Entry {
            width: default_width,
            rights: None,
            default_kerning,
        };

        add_kerning(&mut table, kerning.into_map()?, &default);
        add_width(&mut table, width.into_map(default_width)?, &default);

        Ok(Self {
            entries: table,
            default,
        })
    }
/// Compiles a character table from width and kerning specifications.
///
/// # Errors
///
/// Fails if any of the kerning or width specifications are invalid.
Compiles a character table from width and kerning specifications.
Compiles a character table from width and kerning specifications .
pub fn new(
        width: width::Spec,
        default_width: Length,
        kerning: kerning::Spec,
        default_kerning: Length,
    ) -> Result<Self> {
        let mut table = Subtable::new();
        let default = Entry {
            width: default_width,
            rights: None,
            default_kerning,
        };
        add_kerning(&mut table, kerning.into_map()?, &default);
        add_width(&mut table, width.into_map(default_width)?, &default);
        Ok(Self {
            entries: table,
            default,
        })
    }
pub fn new ( width : width :: Spec , default_width : Length , kerning : kerning :: Spec , default_kerning : Length , ) -> Result < Self > { let mut table = Subtable :: new ( ) ; let default = Entry { width : default_width , rights : None , default_kerning , } ; add_kerning ( & mut table , kerning . into_map ( ) ? , & default ) ; add_width ( & mut table , width . into_map ( default_width ) ? , & default ) ; Ok ( Self { entries : table , default , } ) }
Compiles a character table from width and kerning specifications.
Compiles a character table from width and kerning specifications .
width
width::Spec
default_width
Length
kerning
kerning::Spec
default_kerning
Length
errors
Fails if any of the kerning or width specifications are invalid.
Fails if any of the kerning or width specifications are invalid .