Expand description
16
17
18
19
20
21
22
23
pub fn read<T: Read + Seek>(tape: &mut T) -> Result<File> {
if Tag::from(Tape::peek::<u32>(tape)?) == Tag(*b"ttcf") {
raise!("TrueType collections are not supported yet");
}
Ok(File {
fonts: vec![Font::read(tape)?],
})
}
Find, verify, and read a table.
Find, verify, and read a table given a parameter.
26
27
28
29
30
31
32
pub fn take<'l, T, U>(&self, tape: &mut T) -> Result<Option<U>>
where
T: Read + Seek,
U: Table<'l, Parameter = ()>,
{
self.take_given(tape, ())
}
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.