From e00964fccf40c1c3efb21faef62535ff471e3e7e Mon Sep 17 00:00:00 2001 From: jtnunley Date: Wed, 1 Mar 2023 13:16:13 -0800 Subject: [PATCH 1/2] Add a warning about FontSystem::new() --- src/font/system/std.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/font/system/std.rs b/src/font/system/std.rs index 8d71d5b..5f89888 100644 --- a/src/font/system/std.rs +++ b/src/font/system/std.rs @@ -24,6 +24,12 @@ pub struct FontSystem(FontSystemInner); impl FontSystem { /// Create a new [`FontSystem`], that allows access to any installed system fonts + /// + /// # Timing + /// + /// This function takes some time to run. On the release build, it can take up to a second, + /// while debug builds can take up to ten times longer. For this reason, it should only be + /// called once, and the resulting [`FontSystem`] should be shared. pub fn new() -> Self { Self::new_with_fonts(std::iter::empty()) } From 7098ee62e219436c112499dac1d8db5704ee0575 Mon Sep 17 00:00:00 2001 From: jtnunley Date: Wed, 1 Mar 2023 13:36:29 -0800 Subject: [PATCH 2/2] fmt --- src/font/system/std.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/font/system/std.rs b/src/font/system/std.rs index 5f89888..53fb10d 100644 --- a/src/font/system/std.rs +++ b/src/font/system/std.rs @@ -24,9 +24,9 @@ pub struct FontSystem(FontSystemInner); impl FontSystem { /// Create a new [`FontSystem`], that allows access to any installed system fonts - /// + /// /// # Timing - /// + /// /// This function takes some time to run. On the release build, it can take up to a second, /// while debug builds can take up to ten times longer. For this reason, it should only be /// called once, and the resulting [`FontSystem`] should be shared.