diff --git a/config/config.example.yml b/config/config.example.yml index 652fd16c686..978ea3b07c7 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -400,10 +400,6 @@ themes: attributes: rel: manifest href: assets/dspace/images/favicons/manifest.webmanifest - - tagName: link - attributes: - rel: stylesheet - href: "https://fonts.googleapis.com/icon?family=Material+Icons" # The default bundles that should always be displayed as suggestions when you upload a new bundle bundle: diff --git a/src/assets/fonts/nunito/Nunito-Italic-VariableFont_wght.ttf b/src/assets/fonts/nunito/Nunito-Italic-VariableFont_wght.ttf new file mode 100644 index 00000000000..08ec228a768 Binary files /dev/null and b/src/assets/fonts/nunito/Nunito-Italic-VariableFont_wght.ttf differ diff --git a/src/assets/fonts/nunito/Nunito-VariableFont_wght.ttf b/src/assets/fonts/nunito/Nunito-VariableFont_wght.ttf new file mode 100644 index 00000000000..0a00f63fe98 Binary files /dev/null and b/src/assets/fonts/nunito/Nunito-VariableFont_wght.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Black.ttf b/src/assets/fonts/nunito/static/Nunito-Black.ttf new file mode 100644 index 00000000000..81d557c5b26 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Black.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-BlackItalic.ttf b/src/assets/fonts/nunito/static/Nunito-BlackItalic.ttf new file mode 100644 index 00000000000..b4ba5a1fd80 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-BlackItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Bold.ttf b/src/assets/fonts/nunito/static/Nunito-Bold.ttf new file mode 100644 index 00000000000..886134dcfa3 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Bold.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-BoldItalic.ttf b/src/assets/fonts/nunito/static/Nunito-BoldItalic.ttf new file mode 100644 index 00000000000..0cb4efae9b3 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-BoldItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-ExtraBold.ttf b/src/assets/fonts/nunito/static/Nunito-ExtraBold.ttf new file mode 100644 index 00000000000..711765e6e6b Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-ExtraBold.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-ExtraBoldItalic.ttf b/src/assets/fonts/nunito/static/Nunito-ExtraBoldItalic.ttf new file mode 100644 index 00000000000..bffce10eb76 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-ExtraBoldItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-ExtraLight.ttf b/src/assets/fonts/nunito/static/Nunito-ExtraLight.ttf new file mode 100644 index 00000000000..d9eabf95ef4 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-ExtraLight.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-ExtraLightItalic.ttf b/src/assets/fonts/nunito/static/Nunito-ExtraLightItalic.ttf new file mode 100644 index 00000000000..2037f4a783f Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-ExtraLightItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Italic.ttf b/src/assets/fonts/nunito/static/Nunito-Italic.ttf new file mode 100644 index 00000000000..f4ab1149644 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Italic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Light.ttf b/src/assets/fonts/nunito/static/Nunito-Light.ttf new file mode 100644 index 00000000000..e64c0fef6b2 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Light.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-LightItalic.ttf b/src/assets/fonts/nunito/static/Nunito-LightItalic.ttf new file mode 100644 index 00000000000..b465e5a22bd Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-LightItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Medium.ttf b/src/assets/fonts/nunito/static/Nunito-Medium.ttf new file mode 100644 index 00000000000..e24c1d61a49 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Medium.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-MediumItalic.ttf b/src/assets/fonts/nunito/static/Nunito-MediumItalic.ttf new file mode 100644 index 00000000000..6fec0957235 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-MediumItalic.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-Regular.ttf b/src/assets/fonts/nunito/static/Nunito-Regular.ttf new file mode 100644 index 00000000000..9411bfbe980 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-Regular.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-SemiBold.ttf b/src/assets/fonts/nunito/static/Nunito-SemiBold.ttf new file mode 100644 index 00000000000..1326a7dcf5f Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-SemiBold.ttf differ diff --git a/src/assets/fonts/nunito/static/Nunito-SemiBoldItalic.ttf b/src/assets/fonts/nunito/static/Nunito-SemiBoldItalic.ttf new file mode 100644 index 00000000000..d20e95f7bc9 Binary files /dev/null and b/src/assets/fonts/nunito/static/Nunito-SemiBoldItalic.ttf differ diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index eb4a78b27e2..2c8ebabf6b4 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -497,15 +497,7 @@ export class DefaultAppConfig implements AppConfig { 'rel': 'manifest', 'href': 'assets/dspace/images/favicons/manifest.webmanifest', } - }, - { - // Insert into the of the page. - tagName: 'link', - attributes: { - 'rel': 'stylesheet', - 'href': 'https://fonts.googleapis.com/icon?family=Material+Icons', - } - }, + } ] }, ]; diff --git a/src/styles/_fonts.scss b/src/styles/_fonts.scss new file mode 100644 index 00000000000..5628298a06f --- /dev/null +++ b/src/styles/_fonts.scss @@ -0,0 +1,149 @@ +/** + * Font-face declarations for Nunito font family + * + * @see https://fonts.google.com/specimen/Nunito + */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; // ExtraLight weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-ExtraLight.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; // ExtraLight weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-ExtraLightItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; // Light weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Light.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; // Light weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-LightItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Regular.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; // Regular weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Italic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 500; // Medium weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Medium.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 500; // Medium weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-MediumItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; // SemiBold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-SemiBold.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; // SemiBold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-SemiBoldItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; // Bold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Bold.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; // Bold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-BoldItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; // ExtraBold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-ExtraBold.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; // ExtraBold weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-ExtraBoldItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; // Black weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-Black.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; // Black weight + font-display: swap; + src: url('~src/assets/fonts/nunito/static/Nunito-BlackItalic.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/src/styles/base-theme.scss b/src/styles/base-theme.scss index 539f9fe185d..a91093c2c67 100644 --- a/src/styles/base-theme.scss +++ b/src/styles/base-theme.scss @@ -1,4 +1,5 @@ @import './helpers/font_awesome_imports.scss'; +@import './_fonts.scss'; @import './_vendor.scss'; @import './_custom_variables.scss'; @import './bootstrap_variables_mapping.scss'; diff --git a/src/themes/dspace/styles/_theme_sass_variable_overrides.scss b/src/themes/dspace/styles/_theme_sass_variable_overrides.scss index 17155b15a1e..0d086c865ff 100644 --- a/src/themes/dspace/styles/_theme_sass_variable_overrides.scss +++ b/src/themes/dspace/styles/_theme_sass_variable_overrides.scss @@ -12,7 +12,7 @@ /*** FONT FAMILIES ***/ -@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;1,200;1,300;1,400;1,600;1,700;1,800&display=swap'); +@import './../../../styles/_fonts.scss'; $font-family-sans-serif: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";