Skip to main content

font_face_rules_conflict

Function font_face_rules_conflict 

Source
fn font_face_rules_conflict(
    first_rule: &Descriptors,
    second_rule: &Descriptors,
) -> bool
Expand description

Returns true if the two @font-face rules cannot both apply at the same time.

Two font faces can coexist if they are different for the purposes of font matching: https://drafts.csswg.org/css-fonts-4/#font-matching-algorithm

This method does assume that the family names have already been verified to be equal.