mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 01:47:17 +02:00
🎉 Store custom fonts (ttfs) and use them to write texts (wasm) (#6050)
This commit is contained in:
parent
e4c9b736f7
commit
eb6d2fb0eb
14 changed files with 386 additions and 140 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue