Browse Source

SONAR-18940 Embed Inter font

tags/10.1.0.73491
Jeremy Davis 1 year ago
parent
commit
db412aaf26
24 changed files with 140 additions and 3 deletions
  1. 1
    1
      server/sonar-web/config/esbuild-config.js
  2. BIN
      server/sonar-web/public/fonts/Inter/Inter-Black.woff2
  3. BIN
      server/sonar-web/public/fonts/Inter/Inter-BlackItalic.woff2
  4. BIN
      server/sonar-web/public/fonts/Inter/Inter-Bold.woff2
  5. BIN
      server/sonar-web/public/fonts/Inter/Inter-BoldItalic.woff2
  6. BIN
      server/sonar-web/public/fonts/Inter/Inter-ExtraBold.woff2
  7. BIN
      server/sonar-web/public/fonts/Inter/Inter-ExtraBoldItalic.woff2
  8. BIN
      server/sonar-web/public/fonts/Inter/Inter-ExtraLight.woff2
  9. BIN
      server/sonar-web/public/fonts/Inter/Inter-ExtraLightItalic.woff2
  10. BIN
      server/sonar-web/public/fonts/Inter/Inter-Italic.woff2
  11. BIN
      server/sonar-web/public/fonts/Inter/Inter-Light.woff2
  12. BIN
      server/sonar-web/public/fonts/Inter/Inter-LightItalic.woff2
  13. BIN
      server/sonar-web/public/fonts/Inter/Inter-Medium.woff2
  14. BIN
      server/sonar-web/public/fonts/Inter/Inter-MediumItalic.woff2
  15. BIN
      server/sonar-web/public/fonts/Inter/Inter-Regular.woff2
  16. BIN
      server/sonar-web/public/fonts/Inter/Inter-SemiBold.woff2
  17. BIN
      server/sonar-web/public/fonts/Inter/Inter-SemiBoldItalic.woff2
  18. BIN
      server/sonar-web/public/fonts/Inter/Inter-Thin.woff2
  19. BIN
      server/sonar-web/public/fonts/Inter/Inter-ThinItalic.woff2
  20. 134
    0
      server/sonar-web/public/fonts/Inter/inter.css
  21. 0
    1
      server/sonar-web/src/main/js/app/styles/init/base.css
  22. 2
    0
      server/sonar-web/src/main/js/app/styles/sonar.ts
  23. 1
    1
      sonar-application/build.gradle
  24. 2
    0
      sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java

+ 1
- 1
server/sonar-web/config/esbuild-config.js View File

@@ -56,7 +56,7 @@ module.exports = (release) => {
return {
entryPoints: ['src/main/js/app/index.ts'],
tsconfig: './tsconfig.json',
external: ['/images/*'],
external: ['/images/*', '/fonts/*'],
loader: {
'.png': 'dataurl',
'.md': 'text',

BIN
server/sonar-web/public/fonts/Inter/Inter-Black.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-BlackItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Bold.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-BoldItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-ExtraBold.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-ExtraBoldItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-ExtraLight.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-ExtraLightItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Italic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Light.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-LightItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Medium.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-MediumItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Regular.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-SemiBold.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-SemiBoldItalic.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-Thin.woff2 View File


BIN
server/sonar-web/public/fonts/Inter/Inter-ThinItalic.woff2 View File


+ 134
- 0
server/sonar-web/public/fonts/Inter/inter.css View File

@@ -0,0 +1,134 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url('/fonts/Inter/Inter-Thin.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url('/fonts/Inter/Inter-ThinItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url('/fonts/Inter/Inter-ExtraLight.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 200;
font-display: swap;
src: url('/fonts/Inter/Inter-ExtraLightItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url('/fonts/Inter/Inter-Light.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url('/fonts/Inter/Inter-LightItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/Inter/Inter-Regular.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('/fonts/Inter/Inter-Italic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/Inter/Inter-Medium.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url('/fonts/Inter/Inter-MediumItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/Inter/Inter-SemiBold.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url('/fonts/Inter/Inter-SemiBoldItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/Inter/Inter-Bold.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('/fonts/Inter/Inter-BoldItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url('/fonts/Inter/Inter-ExtraBold.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
font-display: swap;
src: url('/fonts/Inter/Inter-ExtraBoldItalic.woff2?v=3.19') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url('/fonts/Inter/Inter-Black.woff2?v=3.19') format('woff2');
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url('/fonts/Inter/Inter-BlackItalic.woff2?v=3.19') format('woff2');
}

+ 0
- 1
server/sonar-web/src/main/js/app/styles/init/base.css View File

@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

@tailwind base;
@tailwind components;
@tailwind utilities;

+ 2
- 0
server/sonar-web/src/main/js/app/styles/sonar.ts View File

@@ -20,6 +20,8 @@
/*
* The esbuild postcss plugin fails to handle CSS `@import`
*/
import '../../../../../public/fonts/Inter/inter.css';

import './components/badges.css';
import './components/boxed-group.css';
import './components/columns.css';

+ 1
- 1
sonar-application/build.gradle View File

@@ -327,7 +327,7 @@ task zip(type: Zip, dependsOn: [configurations.compileClasspath, downloadElastic
// Check the size of the archive
zip.doLast {
def minLength = 320000000
def maxLength = 355000000
def maxLength = 357000000

def length = archiveFile.get().asFile.length()
if (length < minLength)

+ 2
- 0
sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java View File

@@ -56,6 +56,7 @@ public final class MediaTypes {
private static final String TIFF = "image/tiff";
private static final String TGZ = "application/tgz";
private static final String TSV = "text/tab-separated-values";
private static final String WOFF2 = "application/font-woff2";
private static final String XLS = "application/vnd.ms-excel";
private static final String XSLT = "application/xslt+xml";

@@ -90,6 +91,7 @@ public final class MediaTypes {
MAP.put("html", HTML);
MAP.put("css", CSS);
MAP.put("tsv", TSV);
MAP.put("woff2", WOFF2);
}

private MediaTypes() {

Loading…
Cancel
Save