From 1f634bab456208a629747ef35a8ca7097d8ebf5f Mon Sep 17 00:00:00 2001 From: Ibrahim <93064150+IbrahimCSAE@users.noreply.github.com> Date: Tue, 11 Mar 2025 09:50:46 -0400 Subject: [PATCH] feat(fonts): bundle fonts in OHIF and dont use google cdn (#4821) [OHI-1681] --- .webpack/webpack.base.js | 4 ++ platform/app/public/html-templates/index.html | 11 ---- .../app/public/html-templates/rollbar.html | 4 -- platform/ui-next/src/assets/fonts.css | 50 ++++++++++++++++++ platform/ui-next/src/assets/woff2/latin.woff2 | Bin 0 -> 48556 bytes platform/ui-next/src/tailwind.css | 2 +- platform/ui/.storybook/manager-head.html | 4 -- platform/ui/src/assets/styles/fonts.css | 50 ++++++++++++++++++ platform/ui/src/assets/woff2/latin.woff2 | Bin 0 -> 48556 bytes platform/ui/src/tailwind.css | 2 +- 10 files changed, 106 insertions(+), 21 deletions(-) create mode 100644 platform/ui-next/src/assets/fonts.css create mode 100644 platform/ui-next/src/assets/woff2/latin.woff2 create mode 100644 platform/ui/src/assets/styles/fonts.css create mode 100644 platform/ui/src/assets/woff2/latin.woff2 diff --git a/.webpack/webpack.base.js b/.webpack/webpack.base.js index 025c8bd13..59de36b54 100644 --- a/.webpack/webpack.base.js +++ b/.webpack/webpack.base.js @@ -168,6 +168,10 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => { }, ], }, + { + test: /\.(woff|woff2|eot|ttf|otf)$/i, + type: 'asset/resource', + }, ], //.concat(vtkRules), }, resolve: { diff --git a/platform/app/public/html-templates/index.html b/platform/app/public/html-templates/index.html index 08acb95d1..adfbeec98 100644 --- a/platform/app/public/html-templates/index.html +++ b/platform/app/public/html-templates/index.html @@ -198,17 +198,6 @@ OHIF Viewer - - -