Function stb_truetype_bugfix_19072017::get_font_offset_for_index [] [src]

pub fn get_font_offset_for_index(
    font_collection: &[u8],
    index: i32
) -> Option<u32>

Each .ttf/.ttc file may have more than one font. Each font has a sequential index number starting from 0. Call this function to get the font offset for a given index; it returns None if the index is out of range. A regular .ttf file will only define one font and it always be at offset 0, so it will return Some(0) for index 0, and None for all other indices. You can just skip this step if you know it's that kind of font.