mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🎉 Store custom fonts (ttfs) and use them to write texts (wasm) (#6050)
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user