diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/program.rs | 16 | 
1 files changed, 4 insertions, 12 deletions
diff --git a/src/program.rs b/src/program.rs index c6c702f1..37ff64b1 100644 --- a/src/program.rs +++ b/src/program.rs @@ -312,18 +312,10 @@ impl<P: Definition> Program<P> {          }      } -    /// Sets the fonts that will be loaded at the start of the [`Program`]. -    pub fn fonts( -        self, -        fonts: impl IntoIterator<Item = Cow<'static, [u8]>>, -    ) -> Self { -        Self { -            settings: Settings { -                fonts: fonts.into_iter().collect(), -                ..self.settings -            }, -            ..self -        } +    /// Adds a font to the list of fonts that will be loaded at the start of the [`Program`]. +    pub fn font(mut self, font: impl Into<Cow<'static, [u8]>>) -> Self { +        self.settings.fonts.push(font.into()); +        self      }      /// Sets the [`window::Settings::position`] to [`window::Position::Centered`] in the [`Program`].  | 
