pub struct TypefaceResponse {
pub buffer: Option<Buffer>,
pub buffer_id: Option<u32>,
pub font_index: Option<u32>,
/* private fields */
}
Expand description
Response to a TypefaceRequest. Contains the digital font file and metadata corresponding to a returned typeface. Clients are expected to cache the results if they plan to reuse them.
If a matching typeface cannot be found, the table will be empty.
Fields§
§buffer: Option<Buffer>
A memory buffer containing the bytes of a digital font file. It is the client’s responsibility to identify the type of file and to parse it (usually by delegating to FreeType or a similar library).
buffer_id: Option<u32>
Identifier for the buffer. Responses with the same buffer_id
are guaranteed to contain the
same data in the buffer. Clients may use this value to detect if they already have the font
cached in parsed form.
font_index: Option<u32>
Index of the returned typeface within buffer
. Used for digital font formats that may
contain more than one typeface per file, e.g. TTC (TrueType Collection).
Trait Implementations§
Source§impl Debug for TypefaceResponse
impl Debug for TypefaceResponse
Source§impl Decode<TypefaceResponse, DefaultFuchsiaResourceDialect> for TypefaceResponse
impl Decode<TypefaceResponse, DefaultFuchsiaResourceDialect> for TypefaceResponse
Source§impl Default for TypefaceResponse
impl Default for TypefaceResponse
Source§fn default() -> TypefaceResponse
fn default() -> TypefaceResponse
Source§impl Encode<TypefaceResponse, DefaultFuchsiaResourceDialect> for &mut TypefaceResponse
impl Encode<TypefaceResponse, DefaultFuchsiaResourceDialect> for &mut TypefaceResponse
Source§impl PartialEq for TypefaceResponse
impl PartialEq for TypefaceResponse
Source§impl ResourceTypeMarker for TypefaceResponse
impl ResourceTypeMarker for TypefaceResponse
Source§type Borrowed<'a> = &'a mut TypefaceResponse
type Borrowed<'a> = &'a mut TypefaceResponse
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for TypefaceResponse
impl TypeMarker for TypefaceResponse
Source§type Owned = TypefaceResponse
type Owned = TypefaceResponse
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.