pub struct TypefaceQuery {
pub family: Option<FamilyName>,
pub style: Option<Style2>,
pub languages: Option<Vec<LocaleId>>,
pub code_points: Option<Vec<u32>>,
pub fallback_family: Option<GenericFontFamily>,
pub postscript_name: Option<String>,
pub full_name: Option<String>,
/* private fields */
}
Expand description
Parameters for looking up a typeface.
Fields§
§family: Option<FamilyName>
Desired font family name, e.g. “Roboto”. Font family search is case-insensitive.
Note: In cases where the specified family doesn’t exist, or the specified family doesn’t
have a glyph for the requested code_point
, a face from another family may be returned.
This behavior can be disabled using TypefaceRequestFlags.EXACT_FAMILY
.
style: Option<Style2>
Style properties of the desired typeface.
languages: Option<Vec<LocaleId>>
Language tags in order of preference. This allows disambiguating code points that map to different glyphs in different languages (e.g. CJK code points).
See fuchsia.intl.LocaleId
.
code_points: Option<Vec<u32>>
Optional code points for which glyphs must be present in the returned face.
Callers that specify this field are expected to extract the character set from the result and cache it in order to avoid calling the API more than necessary.
fallback_family: Option<GenericFontFamily>
A generic font family to fall back to if an exact match is unavailable or does not contain the requested code point.
Every font family belongs to a generic family (configured in the font manifest). If a particular font family doesn’t contain a requested code point, the provider can search for the code point in other font families in the same generic family as a fallback.
Specifying fallback_family
in a query allows the client to override the generic family
that would be used as a fallback.
postscript_name: Option<String>
The exact Postscript name of the typeface to look up. This corresponds to name ID 6
in
the TrueType/OpenType name
table.
All characters must be in the printable ASCII range (U+0021 to U+007E), and must not be ‘[’, ‘]’, ‘(’, ‘)’, ‘{’, ‘}’, ‘<’, ‘>’, ‘/’, or ‘%’.
If this field is specified, all the other query fields are ignored.
full_name: Option<String>
The exact full name of the typeface to look up. This corresponds to name ID 4
in the
TrueType/OpenType name
table.
If this field is specified, all the other query fields are ignored.
Trait Implementations§
Source§impl Clone for TypefaceQuery
impl Clone for TypefaceQuery
Source§fn clone(&self) -> TypefaceQuery
fn clone(&self) -> TypefaceQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TypefaceQuery
impl Debug for TypefaceQuery
Source§impl<D: ResourceDialect> Decode<TypefaceQuery, D> for TypefaceQuery
impl<D: ResourceDialect> Decode<TypefaceQuery, D> for TypefaceQuery
Source§impl Default for TypefaceQuery
impl Default for TypefaceQuery
Source§fn default() -> TypefaceQuery
fn default() -> TypefaceQuery
Source§impl<D: ResourceDialect> Encode<TypefaceQuery, D> for &TypefaceQuery
impl<D: ResourceDialect> Encode<TypefaceQuery, D> for &TypefaceQuery
Source§impl PartialEq for TypefaceQuery
impl PartialEq for TypefaceQuery
Source§impl TypeMarker for TypefaceQuery
impl TypeMarker for TypefaceQuery
Source§type Owned = TypefaceQuery
type Owned = TypefaceQuery
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.Source§impl ValueTypeMarker for TypefaceQuery
impl ValueTypeMarker for TypefaceQuery
Source§type Borrowed<'a> = &'a TypefaceQuery
type Borrowed<'a> = &'a TypefaceQuery
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for TypefaceQuery
impl StructuralPartialEq for TypefaceQuery
Auto Trait Implementations§
impl Freeze for TypefaceQuery
impl RefUnwindSafe for TypefaceQuery
impl Send for TypefaceQuery
impl Sync for TypefaceQuery
impl Unpin for TypefaceQuery
impl UnwindSafe for TypefaceQuery
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)