Unable to add custom fonts to new version of GUSWDS

Created on 6 December 2023, about 1 year ago

After switching the GUSWDS theme from v4.4.0 to v5.2.5 the code shown below contained in a .scss file is no longer working.
I double-checked that the .scss file has a '@use ...' statement in the 'styles.scss' and gets imported.

What are the proper steps to import custom fonts into GUSWDS v5.2.5?

Any insight would be highly appreciated. Thank you very much.

$theme-typeface-tokens: (
  prodigysans: (
    display-name: 'ProdigySans',
    cap-height: 364px,
  ),
  montserrat: (
    display-name: 'Montserrat',
    cap-height: 360px,
  ),
);
$theme-font-type-serif: 'prodigysans';
$theme-font-serif-custom-stack: 'Arial, Sans-serif';
$theme-font-serif-custom-src: (
  dir: 'fonts/prodigysans',
  roman: (
    100: false,
    200: false,
    300: 'ProdigySans-Light',
    400: 'ProdigySans-Regular',
    500: 'ProdigySans-Medium',
    600: false,
    700: 'ProdigySans-Bold',
    800: false,
    900: false,
  ),
  italic: (
    100: false,
    200: false,
    300: 'ProdigySans-LightItalic',
    400: 'ProdigySans-RegularItalic',
    500: 'ProdigySans-MediumItalic',
    600: false,
    700: 'ProdigySans-BoldItalic',
    800: false,
    900: false,
  ),
);

$theme-font-type-sans: 'montserrat';
$theme-font-sans-custom-stack: 'Arial, Sans-serif';
$theme-font-sans-custom-src: (
  dir: 'fonts/montserrat',
  roman: (
    100: false,
    200: false,
    300: 'Montserrat-Light',
    400: 'Montserrat-Regular',
    500: 'Montserrat-Medium',
    600: false,
    700: 'Montserrat-Bold',
    800: false,
    900: false,
  ),
  italic: (
    100: false,
    200: false,
    300: 'Montserrat-LightItalic',
    400: 'Montserrat-Italic',
    500: 'Montserrat-MediumItalic',
    600: false,
    700: 'Montserrat-BoldItalic',
    800: false,
    900: false,
  ),
);
πŸ’¬ Support request
Status

Active

Version

5.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alexi721

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024