mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 16:17:20 +02:00
🐛 Cache emoji font correctly
This commit is contained in:
parent
79e1c29306
commit
8c20159fb0
3 changed files with 21 additions and 7 deletions
|
@ -31,11 +31,19 @@ pub extern "C" fn store_font(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn is_font_uploaded(a: u32, b: u32, c: u32, d: u32, weight: u32, style: u8) -> bool {
|
||||
pub extern "C" fn is_font_uploaded(
|
||||
a: u32,
|
||||
b: u32,
|
||||
c: u32,
|
||||
d: u32,
|
||||
weight: u32,
|
||||
style: u8,
|
||||
is_emoji: bool,
|
||||
) -> bool {
|
||||
with_state!(state, {
|
||||
let id = uuid_from_u32_quartet(a, b, c, d);
|
||||
let family = FontFamily::new(id, weight, style.into());
|
||||
let res = state.render_state().fonts().has_family(&family);
|
||||
let res = state.render_state().fonts().has_family(&family, is_emoji);
|
||||
|
||||
res
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue