From 0a6ea15f6c1857f3a036e70e34df2565737ccd07 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 25 Dec 2023 19:00:54 +0100 Subject: [PATCH] impl `Clone` for `Fonts` (#3737) Closes https://github.com/emilk/egui/issues/3731 --- .vscode/settings.json | 1 + crates/epaint/src/text/fonts.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index dbe8e662..8ec1e4aa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -32,4 +32,5 @@ "--all-targets", "--all-features", ], + "rust-analyzer.showUnlinkedFileNotification": false, } diff --git a/crates/epaint/src/text/fonts.rs b/crates/epaint/src/text/fonts.rs index 7165b265..177c7327 100644 --- a/crates/epaint/src/text/fonts.rs +++ b/crates/epaint/src/text/fonts.rs @@ -348,6 +348,7 @@ impl FontDefinitions { /// If you are using `egui`, use `egui::Context::set_fonts` and `egui::Context::fonts`. /// /// You need to call [`Self::begin_frame`] and [`Self::font_image_delta`] once every frame. +#[derive(Clone)] pub struct Fonts(Arc>); impl Fonts {