From 58d292a6f1bd74bca8b671ed2ed1153a4c437e7d Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 28 Dec 2022 11:21:57 -0800 Subject: [PATCH] Add FontSystem::into_locale_and_db for std system --- src/font/system/std.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/font/system/std.rs b/src/font/system/std.rs index 12924b1..76c8448 100644 --- a/src/font/system/std.rs +++ b/src/font/system/std.rs @@ -85,6 +85,11 @@ impl FontSystem { self.0.borrow_db() } + pub fn into_locale_and_db(self) -> (String, fontdb::Database) { + let heads = self.0.into_heads(); + (heads.locale, heads.db) + } + // Clippy false positive #[allow(clippy::needless_lifetimes)] pub fn get_font<'a>(&'a self, id: fontdb::ID) -> Option>> {