// Copyright 2022 The peniko authors.
// SPDX-License-Identifier: Apache-2.0 OR MIT
usesuper::Blob;/// Owned shareable font resource.
#[derive(Clone, PartialEq, Debug)]pubstructFont{/// Blob containing the content of the font file.
pubdata:Blob<u8>,
/// Index of the font in a collection, or 0 for a single font.
pubindex:u32,
}implFont{/// Creates a new font with the given data and collection index.
pubfnnew(data:Blob<u8>, index:u32)->Self{Self{ data, index }}}