mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +00:00
Add support for embedding bitmap fonts in C++
This commit is contained in:
parent
49b3e15bc8
commit
917cecff85
4 changed files with 141 additions and 8 deletions
|
@ -122,6 +122,15 @@ pub unsafe extern "C" fn slint_register_font_from_data(
|
|||
)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn slint_register_bitmap_font(
|
||||
win: *const WindowAdapterRcOpaque,
|
||||
font_data: &'static i_slint_core::graphics::BitmapFont,
|
||||
) {
|
||||
let window_adapter = &*(win as *const Rc<dyn WindowAdapter>);
|
||||
window_adapter.renderer().register_bitmap_font(font_data);
|
||||
}
|
||||
|
||||
#[cfg(feature = "testing")]
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn slint_testing_init_backend() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue