#[no_mangle]
pub extern "C" fn ratatui_set_custom_font(
handle: *mut c_void,
font_data: *const u8,
font_len: u32,
) -> u8Expand description
Replaces the embedded JetBrains Mono font with custom TTF bytes.
The cell width/height are recomputed from the new font’s metrics, and the glyph cache is dropped. The pixel buffer is not resized here; callers that rely on a specific pixel size should re-create the handle if the new font changes cell dimensions.
§Returns
1 on success, 0 if handle is null, font_data is null/empty, or the
bytes are not a valid font.