Skip to main content

class_matrix_range

Function class_matrix_range 

Source
fn class_matrix_range(
    len: usize,
    start: usize,
    record_len: usize,
    class1_count: u16,
    class2_count: u16,
) -> Option<Range<usize>>
Expand description

The byte range of a class pair subtable’s value matrix, or None if it does not fit in the subtable’s len bytes.

The extent is checked here because the generated range helpers add the matrix size to its start unchecked, which overflows on 32-bit targets.