pub enum ProviderRequest {
GetFont {
request: Request,
responder: ProviderGetFontResponder,
},
GetFamilyInfo {
family: String,
responder: ProviderGetFamilyInfoResponder,
},
GetTypeface {
request: TypefaceRequest,
responder: ProviderGetTypefaceResponder,
},
GetFontFamilyInfo {
family: FamilyName,
responder: ProviderGetFontFamilyInfoResponder,
},
RegisterFontSetEventListener {
listener: ClientEnd<FontSetEventListenerMarker>,
responder: ProviderRegisterFontSetEventListenerResponder,
},
}
Expand description
Provider of digital font files and metadata.
TODO(https://fxbug.dev/42170326): Remove deprecated methods and move to provider.fidl.
Variants§
GetFont
Deprecated. See GetTypeface
.
Returns font that matches specified request
.
GetFamilyInfo
Deprecated. See GetFontFamilyInfo
.
Returns information for the specified font family or null if there is no family with the specified name. This function respects family name aliases and ignores case, so request for “robotoSLAB” will return FamilyInfo for “Roboto Slab”.
GetTypeface
Returns a typeface that matches the specified request
, or an empty table if no matching
face is found. (The latter is more likely to happen if TypefaceRequestFlags.EXACT_FAMILY
is used to disable fallbacks.)
GetFontFamilyInfo
Returns information for the specified font family, or an empty table if there is no family with the specified name.
This function respects family name aliases and ignores case. For example, “RobotoSlab” is an
alias for the canonical name “Roboto Slab”. A request for “robotoSLAB” would return the
FontFamilyInfo
for “Roboto Slab” due to the case-insensitivity and alias resolution.
RegisterFontSetEventListener
Register a listener to be notified when the set of available fonts or mappings has changed. A client can register as many listeners as it wishes.
To unregister, close the channel.
Fields
listener: ClientEnd<FontSetEventListenerMarker>
Implementations§
Source§impl ProviderRequest
impl ProviderRequest
pub fn into_get_font(self) -> Option<(Request, ProviderGetFontResponder)>
pub fn into_get_family_info( self, ) -> Option<(String, ProviderGetFamilyInfoResponder)>
pub fn into_get_typeface( self, ) -> Option<(TypefaceRequest, ProviderGetTypefaceResponder)>
pub fn into_get_font_family_info( self, ) -> Option<(FamilyName, ProviderGetFontFamilyInfoResponder)>
pub fn into_register_font_set_event_listener( self, ) -> Option<(ClientEnd<FontSetEventListenerMarker>, ProviderRegisterFontSetEventListenerResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL