🎉 Store custom fonts (ttfs) and use them to write texts (wasm) (#6050)

This commit is contained in:
Belén Albeza 2025-03-14 12:45:15 +01:00 committed by GitHub
parent e4c9b736f7
commit eb6d2fb0eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 386 additions and 140 deletions

View file

@ -38,14 +38,6 @@ pub extern "C" fn free_bytes() {
std::mem::drop(guard);
}
pub fn buffer_ptr() -> *mut u8 {
let guard = BUFFERU8.lock().unwrap();
guard
.as_ref()
.map_or(std::ptr::null_mut(), |buffer| buffer.as_ptr() as *mut u8)
}
pub fn bytes() -> Vec<u8> {
let mut guard = BUFFERU8.lock().unwrap();