/*
 * Be Vietnam Pro, self-hosted (SIL OFL 1.1, see OFL.txt). The subset is made by tools/fonts.
 * The file name carries the version, so `/fonts/*` is cached as immutable: change the glyph set or
 * this CSS and the name changes with it.
 *
 * `font-display: swap` shows text at once in the fallback face below, then swaps. The fallback
 * faces are local Arial (or its metric twin Liberation Sans), scaled to Be Vietnam Pro's average
 * advance width (Vietnamese sample text) and line box, so the swap barely moves the layout.
 *   size-adjust = BVP avg advance / Arial avg advance   (0.4797/0.4460, 0.4906/0.4767, 0.4960/0.4767)
 *   ascent-override  = BVP hhea ascent  (1.000 em) / size-adjust
 *   descent-override = BVP hhea descent (0.265 em) / size-adjust, line-gap-override 0 (BVP has none)
 * The font-family token (--font-sans) names 'Be Vietnam Pro' and 'Be Vietnam Pro Fallback'.
 */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-v1-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-v1-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/be-vietnam-pro-v1-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Be Vietnam Pro Fallback';
  font-style: normal;
  font-weight: 400;
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');
  size-adjust: 107.55%;
  ascent-override: 92.98%;
  descent-override: 24.64%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Be Vietnam Pro Fallback';
  font-style: normal;
  font-weight: 600;
  src:
    local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),
    local('LiberationSans-Bold');
  size-adjust: 102.92%;
  ascent-override: 97.16%;
  descent-override: 25.75%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Be Vietnam Pro Fallback';
  font-style: normal;
  font-weight: 700;
  src:
    local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),
    local('LiberationSans-Bold');
  size-adjust: 104.05%;
  ascent-override: 96.11%;
  descent-override: 25.47%;
  line-gap-override: 0%;
}
