billydm / iced_baseview Goto Github PK
View Code? Open in Web Editor NEWA baseview backend for the Iced GUI library
License: MIT License
A baseview backend for the Iced GUI library
License: MIT License
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 renderer
let 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 trait
let mut 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
.
I was wondering if there is a way to pass keyboard events into iced_baseview? Previously I did this by storing the Handle
returned by iced_baseview::Runner
, but it looks like that's been removed somewhat recently (and then hackilly forwarding keyboard events to it). Is there a different way to do this now? I noticed you added open_parented
, but I'm not sure how to actually pass through a keyboard event, since it doesn't look like you get a handle or anything.
The ModifiersChanged
event doesn't correctly report the last modifier change, so if I press control, mods.control is false, but when I release it, mods.control will be true.
mismatched types
expected struct `baseview::window_open_options::WindowOpenOptions`, found struct `baseview::WindowOpenOptions`
note: perhaps two different versions of crate `baseview` are being used?rustc(E0308)
lib.rs(321, 21): expected struct `baseview::window_open_options::WindowOpenOptions`, found struct `baseview::WindowOpenOptions`
I'm sorry, I'm still new to Rust, so I'm not sure what this means.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.