diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-21 23:43:14 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-21 23:43:22 +0100 |
| commit | 9fc432a41d9970dfff360fec225a926b5ab8f2ab (patch) | |
| tree | a2b921475c5dd6dcf140afa99da8ac213bb24e31 /cli | |
| parent | a6b63b96f9a5f07dabbe195b16d00d778d3246ff (diff) | |
Switch to `Buffer::from_static` for embedded fonts
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index dfb13aaa..e978d35d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -623,8 +623,8 @@ impl FontSearcher { /// Add fonts that are embedded in the binary. #[cfg(feature = "embed-fonts")] fn add_embedded(&mut self) { - let mut add = |bytes: &[u8]| { - let buffer = Buffer::from(bytes); + let mut add = |bytes: &'static [u8]| { + let buffer = Buffer::from_static(bytes); for (i, font) in Font::iter(buffer).enumerate() { self.book.push(font.info().clone()); self.fonts.push(FontSlot { |
