Merge pull request #92 from notgull/font-system-new-warning
docs: Add a warning about FontSystem::new()
This commit is contained in:
commit
0548d7ae59
1 changed files with 6 additions and 0 deletions
|
|
@ -24,6 +24,12 @@ pub struct FontSystem(FontSystemInner);
|
||||||
|
|
||||||
impl FontSystem {
|
impl FontSystem {
|
||||||
/// Create a new [`FontSystem`], that allows access to any installed system fonts
|
/// 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 {
|
pub fn new() -> Self {
|
||||||
Self::new_with_fonts(std::iter::empty())
|
Self::new_with_fonts(std::iter::empty())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue