# Trait FontRead

    pub trait FontRead<'a>: Sized {
        // Required method
        fn read(data: FontData<'a>) -> Result<Self, ReadError>;
    }

Expand description

A type that can be read from raw table data.

This trait is implemented for all font tables that are self-describing: that is, tables that do not require any external state in order to interpret their underlying bytes. (Tables that require external state implement `FontReadWithArgs` instead)

## Required Methods§

#### fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of `Self` from the provided data, performing validation.

In the case of a table, this method is responsible for ensuring the input data is consistent: this means ensuring that any versioned fields are present as required by the version, and that any array lengths are not out-of-bounds.

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

## Implementors§

§

### impl<'a> FontRead<'a> for Lookup<'a>

§

### impl<'a> FontRead<'a> for BaseCoord<'a>

§

### impl<'a> FontRead<'a> for CmapSubtable<'a>

§

### impl<'a> FontRead<'a> for ClipBox<'a>

§

### impl<'a> FontRead<'a> for Paint<'a>

§

### impl<'a> FontRead<'a> for CaretValue<'a>

§

### impl<'a> FontRead<'a> for ChainedSequenceContext<'a>

§

### impl<'a> FontRead<'a> for ClassDef<'a>

§

### impl<'a> FontRead<'a> for CoverageTable<'a>

§

### impl<'a> FontRead<'a> for DeviceOrVariationIndex<'a>

§

### impl<'a> FontRead<'a> for SequenceContext<'a>

§

### impl<'a> FontRead<'a> for Glyph<'a>

§

### impl<'a> FontRead<'a> for AnchorTable<'a>

§

### impl<'a> FontRead<'a> for cosmic::iced::daemon::program::graphics::text::cosmic_text::skrifa::raw::tables::gpos::ExtensionSubtable<'a>

§

### impl<'a> FontRead<'a> for PairPos<'a>

§

### impl<'a> FontRead<'a> for PositionLookup<'a>

§

### impl<'a> FontRead<'a> for SinglePos<'a>

§

### impl<'a> FontRead<'a> for cosmic::iced::daemon::program::graphics::text::cosmic_text::skrifa::raw::tables::gsub::ExtensionSubtable<'a>

§

### impl<'a> FontRead<'a> for SingleSubst<'a>

§

### impl<'a> FontRead<'a> for SubstitutionLookup<'a>

§

### impl<'a> FontRead<'a> for Kern<'a>

§

### impl<'a> FontRead<'a> for Condition<'a>

§

### impl<'a> FontRead<'a> for CustomCharset<'a>

§

### impl<'a> FontRead<'a> for FdSelect<'a>

§

### impl<'a> FontRead<'a> for AxisValue<'a>

§

### impl<'a> FontRead<'a> for DeltaSetIndexMap<'a>

§

### impl<'a> FontRead<'a> for FontData<'a>

§

### impl<'a> FontRead<'a> for StateTable<'a>

§

### impl<'a> FontRead<'a> for SegmentMaps<'a>

§

### impl<'a> FontRead<'a> for Cff2<'a>

§

### impl<'a> FontRead<'a> for Cff<'a>

§

### impl<'a> FontRead<'a> for Subtable1<'a>

§

### impl<'a> FontRead<'a> for Subtable2<'a>

§

### impl<'a> FontRead<'a> for Subtable4<'a>

§

### impl<'a> FontRead<'a> for ScriptLangTag<'a>

§

### impl<'a> FontRead<'a> for ContextualSubtable<'a>

§

### impl<'a> FontRead<'a> for InsertionSubtable<'a>

§

### impl<'a> FontRead<'a> for LigatureSubtable<'a>

§

### impl<'a> FontRead<'a> for PString<'a>

§

### impl<'a, T> FontRead<'a> for VarLenArray<'a, T>

§

### impl<'a, T> FontRead<'a> for ExtendedStateTable<'a, T>

§

### impl<'a, T> FontRead<'a> for StateEntry<T>
where T: AnyBitPattern + FixedSize,

§

### impl<'a, T> FontRead<'a> for TypedLookup<'a, T>