Function mupdf_sys::fz_new_font_from_buffer[][src]

pub unsafe extern "C" fn fz_new_font_from_buffer(
    ctx: *mut fz_context,
    name: *const c_char,
    buffer: *mut fz_buffer,
    index: c_int,
    use_glyph_bbox: c_int
) -> *mut fz_font

Create a new font from a font file in a fz_buffer.

name: Name of font (leave NULL to use name from font).

buffer: Buffer to load from.

index: Which font from the file to load (0 for default).

use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.

Returns new font handle, or throws exception on error.