Skip to content

Commit

Permalink
Merged in task/dspace-cris-2023_02_x/DSC-1957_II (pull request DSpace…
Browse files Browse the repository at this point in the history
…#2412)

[DSC-1957] Local installation of Nunito font

Approved-by: Giuseppe Digilio
  • Loading branch information
alisaismailati authored and atarix83 committed Nov 18, 2024
2 parents 5fb1496 + 9e847aa commit 644e20c
Show file tree
Hide file tree
Showing 23 changed files with 152 additions and 14 deletions.
4 changes: 0 additions & 4 deletions config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/nunito/static/Nunito-Black.ttf
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/nunito/static/Nunito-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/nunito/static/Nunito-Italic.ttf
Binary file not shown.
Binary file added src/assets/fonts/nunito/static/Nunito-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file added src/assets/fonts/nunito/static/Nunito-Medium.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 1 addition & 9 deletions src/config/default-app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,7 @@ export class DefaultAppConfig implements AppConfig {
'rel': 'manifest',
'href': 'assets/dspace/images/favicons/manifest.webmanifest',
}
},
{
// Insert <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> into the <head> of the page.
tagName: 'link',
attributes: {
'rel': 'stylesheet',
'href': 'https://fonts.googleapis.com/icon?family=Material+Icons',
}
},
}
]
},
];
Expand Down
149 changes: 149 additions & 0 deletions src/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions src/styles/base-theme.scss
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 644e20c

Please sign in to comment.