You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like iced 0.10 have a new way to load custom fonts. It's not really documented, but using the wgpu integration example, I was able to load the fonts via the renderer instance:
// This is the WGPU rendererlet wgpu_renderer = iced_wgpu::Renderer::new(Backend::new(&device,&queue,Settings::default(), format));// We wrap the renderer in a type that implements the iced renderer traitletmut renderer = iced_renderer::Renderer::Wgpu(wgpu_renderer);// load custom fonts
renderer.load_font(Cow::from(MY_CUSTOM_FONT1_BYTES));// &[u8]
renderer.load_font(Cow::from(MY_CUSTOM_FONT2_BYTES));// &[u8]
Then, you can use those fonts using Family::Name("CustomFontName").
I am experimenting on my fork passing fonts extending the IcedBaseviewSettings.
The text was updated successfully, but these errors were encountered:
Looks like
iced
0.10 have a new way to load custom fonts. It's not really documented, but using the wgpu integration example, I was able to load the fonts via the renderer instance:Then, you can use those fonts using
Family::Name("CustomFontName")
.I am experimenting on my fork passing fonts extending the
IcedBaseviewSettings
.The text was updated successfully, but these errors were encountered: