SheetXL - v1.0.2
    Preparing search index...

    Function toCSSFontFamily

    • The CSS font-family value that paints family: the family, then the fonts that stand in for it where it is not installed, then fallbacks, each followed by its own stand-ins.

      A stand-in is the family family is measured by and that family's open metric-compatible twins, so text painted on a machine without the original still fits its measurement.

      Parameters

      • family: string

        The family as a style names it.

      • Optionalfallbacks: readonly string[] | null

        Families or CSS generic names to try after it.

      Returns string

      IFont.toCSSFontFamily('Calibri', ['sans-serif']); // 'Calibri, Carlito, sans-serif'
      IFont.toCSSFontFamily('Aptos Narrow', ['sans-serif']); // '"Aptos Narrow", "Intos Narrow", Calibri, Carlito, sans-serif'