Enum flo_canvas::FontOp
source · pub enum FontOp {
UseFontDefinition(Arc<CanvasFontFace>),
FontSize(f32),
LayoutText(String),
DrawGlyphs(Vec<GlyphPosition>),
}
Expand description
Operations that can be performed on a font
Variants§
UseFontDefinition(Arc<CanvasFontFace>)
Loads a font from a font data file
FontSize(f32)
Sets the font size to use for this font ID (in canvas units)
LayoutText(String)
Lays out some text in the active layout, to be rendered in the current fill style
DrawGlyphs(Vec<GlyphPosition>)
Draws a series of glyphs using the current fill style
Trait Implementations§
source§impl<'a> CanvasEncoding<String> for &'a FontOp
impl<'a> CanvasEncoding<String> for &'a FontOp
source§fn encode_canvas(&self, append_to: &mut String)
fn encode_canvas(&self, append_to: &mut String)
Encodes this item by appending it to the specified string
source§impl<'de> Deserialize<'de> for FontOp
impl<'de> Deserialize<'de> for FontOp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more