$fontName: "DSEG7";
$fontId: "dseg7";
$style: normal;
$display: swap;
$weight: 400;
$fontDir: "~@fontsource/#{$fontId}/files";
$unicodeRange: false;
$unicodeRangeValues: null;

@mixin fontFaceCustom(
  $fontName: $fontName,
  $fontId: $fontId,
  $style: $style,
  $display: $display,
  $weight: $weight,
  $woff2Path: null,
  $woffPath: null,
  $unicodeRange: $unicodeRange,
  $unicodeRangeValues: $unicodeRangeValues
) {
  @if $woffPath == null {
    $woffPath: "#{$fontDir}/#{$fontId}-classic-#{$weight}-#{$style}.woff";
  }
  @if $woff2Path == null {
    $woff2Path: "#{$fontDir}/#{$fontId}-classic-#{$weight}-#{$style}.woff2";
  }

  @font-face {
    font-family: "#{$fontName}";
    font-style: $style;
    font-display: $display;
    font-weight: $weight;
    src: url("#{$woff2Path}") format("woff2"), url("#{$woffPath}") format("woff");
    @if $unicodeRange {
      unicode-range: $unicodeRangeValues;
    }
  }
}
