More font handling cleanup

Group all fields we need to determine a physical font into one FontRequest
structure and use that throughout.

That way adding more fields will require less changes.
This commit is contained in:
Simon Hausmann 2020-11-24 09:00:07 +01:00
parent 05204a3185
commit f0289192b7
5 changed files with 42 additions and 63 deletions

View file

@ -285,7 +285,7 @@ pub enum HighLevelRenderingPrimitive {
/// Expected rendering variables:
/// * [`RenderingVariable::Color`]: The color to use for rendering the glyphs.
/// * [`RenderingVariable::TextCursor`]: Draw a text cursor.
Text { text: crate::SharedString, font_family: crate::SharedString, font_size: f32 },
Text { text: crate::SharedString, font_request: super::font::FontRequest },
/// Renders a path specified by the `elements` parameter. The path will be scaled to fit into the given
/// `width` and `height`. If the `stroke_width` is greater than zero, then path will also be outlined.
///