pub fn continue_with_new_font(mut self, last_font_id: FontId, new_font: &Arc<CanvasFontFace>, new_em_size: f32) -> CanvasFontLineLayout {
        // Layout the pending text before continuing
        self.layout_pending();

        // Finish the current layout by generating the drawing actions, and remember the state
        let x_off           = self.x_off;
        let y_off           = self.y_off;
        let metrics         = self.metrics.clone();
        let drawing         = self.to_drawing(last_font_id);

        // Create a new layout with the new font
        let mut new_layout  = CanvasFontLineLayout::new(new_font, new_em_size);

        // Set it up to continue where the existing layout left off
        new_layout.layout   = drawing.into_iter().map(|draw| LayoutAction::Draw(draw)).collect();
        new_layout.x_off    = x_off;
        new_layout.y_off    = y_off;

        new_layout.metrics.inner_bounds = new_layout.metrics.inner_bounds.union_bounds(metrics.inner_bounds);

        new_layout
    }
///
/// Continues the layout with a new font
///
/// `last_font_id` should be the ID of the font that the glyphs that have been rendered so far should be rendered in
///
Continues the layout with a new font
`last_font_id` should be the ID of the font that the glyphs that have been rendered so far should be rendered in
Continues the layout with a new font ` last_font_id ` should be the ID of the font that the glyphs that have been rendered so far should be rendered in
pub fn continue_with_new_font(mut self, last_font_id: FontId, new_font: &Arc<CanvasFontFace>, new_em_size: f32) -> CanvasFontLineLayout {
        // Layout the pending text before continuing
        self.layout_pending();
        // Finish the current layout by generating the drawing actions, and remember the state
        let x_off           = self.x_off;
        let y_off           = self.y_off;
        let metrics         = self.metrics.clone();
        let drawing         = self.to_drawing(last_font_id);
        // Create a new layout with the new font
        let mut new_layout  = CanvasFontLineLayout::new(new_font, new_em_size);
        // Set it up to continue where the existing layout left off
        new_layout.layout   = drawing.into_iter().map(|draw| LayoutAction::Draw(draw)).collect();
        new_layout.x_off    = x_off;
        new_layout.y_off    = y_off;
        new_layout.metrics.inner_bounds = new_layout.metrics.inner_bounds.union_bounds(metrics.inner_bounds);
        new_layout
    }
pub fn continue_with_new_font ( mut self , last_font_id : FontId , new_font : & Arc < CanvasFontFace > , new_em_size : f32 ) -> CanvasFontLineLayout { // Layout the pending text before continuing self . layout_pending ( ) ; // Finish the current layout by generating the drawing actions, and remember the state let x_off = self . x_off ; let y_off = self . y_off ; let metrics = self . metrics . clone ( ) ; let drawing = self . to_drawing ( last_font_id ) ; // Create a new layout with the new font let mut new_layout = CanvasFontLineLayout :: new ( new_font , new_em_size ) ; // Set it up to continue where the existing layout left off new_layout . layout = drawing . into_iter ( ) . map ( | draw | LayoutAction :: Draw ( draw ) ) . collect ( ) ; new_layout . x_off = x_off ; new_layout . y_off = y_off ; new_layout . metrics . inner_bounds = new_layout . metrics . inner_bounds . union_bounds ( metrics . inner_bounds ) ; new_layout }
Continues the layout with a new font
`last_font_id` should be the ID of the font that the glyphs that have been rendered so far should be rendered in
Continues the layout with a new font ` last_font_id ` should be the ID of the font that the glyphs that have been rendered so far should be rendered in
mut self
last_font_id
FontId
new_font
&Arc<CanvasFontFace>
new_em_size
f32