Skip to content

Commit

Permalink
feat(text): do not wrap an Arc in another Arc for VelloFont
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 authored and simbleau committed Jul 5, 2024
1 parent cfb0c39 commit df6bcea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const VARIATIONS: &[(&str, f32)] = &[];

#[derive(Asset, TypePath, Clone)]
pub struct VelloFont {
pub font: Arc<peniko::Font>,
pub font: peniko::Font,
}

impl RenderAsset for VelloFont {
Expand All @@ -34,7 +34,7 @@ impl RenderAsset for VelloFont {
impl VelloFont {
pub fn new(font_data: Vec<u8>) -> Self {
Self {
font: Arc::new(Font::new(Blob::new(Arc::new(font_data)), 0)),
font: Font::new(Blob::new(Arc::new(font_data)), 0),
}
}

Expand Down

0 comments on commit df6bcea

Please sign in to comment.