diff options
author | 2023-02-04 07:33:33 +0100 | |
---|---|---|
committer | 2023-02-24 13:28:24 +0100 | |
commit | b29de28d1f0f608f8029c93d154cfd1b0f8b8cbb (patch) | |
tree | e100af1dd98d23b29046bc951b04b440d2aa5bc2 /wgpu/src/text.rs | |
parent | a7580e0696a1a0ba76a89db3f78bc99ba3fbb361 (diff) | |
download | iced-b29de28d1f0f608f8029c93d154cfd1b0f8b8cbb.tar.gz iced-b29de28d1f0f608f8029c93d154cfd1b0f8b8cbb.tar.bz2 iced-b29de28d1f0f608f8029c93d154cfd1b0f8b8cbb.zip |
Overhaul `Font` type to allow font family selection
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r-- | wgpu/src/text.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index fa7fd5df..083d9d2b 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -112,8 +112,6 @@ impl Pipeline { device: &wgpu::Device, queue: &wgpu::Queue, format: wgpu::TextureFormat, - _default_font: Option<&[u8]>, - _multithreading: bool, ) -> Self { Pipeline { renderers: Vec::new(), @@ -316,7 +314,11 @@ impl Pipeline { fn to_family(font: Font) -> glyphon::Family<'static> { match font { - Font::Default => glyphon::Family::SansSerif, - Font::External { name, .. } => glyphon::Family::Name(name), + Font::Name(name) => glyphon::Family::Name(name), + Font::SansSerif => glyphon::Family::SansSerif, + Font::Serif => glyphon::Family::Serif, + Font::Cursive => glyphon::Family::Cursive, + Font::Fantasy => glyphon::Family::Fantasy, + Font::Monospace => glyphon::Family::Monospace, } } |