diff --git a/package.json b/package.json index dc7380a..8e40c05 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "@types/react-dom": "^16.9.8", "clsx": "^1.1.1", "date-fns": "^2.16.1", - "fontsource-roboto": "^3.1.5", "graphql": "^15.4.0", "i18next": "^19.8.3", "i18next-browser-languagedetector": "^6.0.1", diff --git a/src/config/app.ts b/src/config/app.ts index 8910572..f677a09 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -1,4 +1,4 @@ -export const DEFAULT_LANGUAGE = process.env.REACT_APP_DEFAULT_LANGUAGE ?? 'en'; +export const DEFAULT_LANGUAGE = process.env.REACT_APP_DEFAULT_LANGUAGE ?? 'pl'; export const NAME = 'TWHelp'; diff --git a/src/features/App.tsx b/src/features/App.tsx index 024a9a7..c64efcd 100644 --- a/src/features/App.tsx +++ b/src/features/App.tsx @@ -1,4 +1,3 @@ -import 'fontsource-roboto/latin-ext.css'; import React, { Fragment } from 'react'; import * as ROUTES from '@config/routes'; diff --git a/src/theme/createTheme.ts b/src/theme/createTheme.ts index 4c3aae8..e8a96cf 100644 --- a/src/theme/createTheme.ts +++ b/src/theme/createTheme.ts @@ -1,3 +1,4 @@ +import './font.css'; import { createMuiTheme, responsiveFontSizes, diff --git a/src/theme/font.css b/src/theme/font.css new file mode 100644 index 0000000..d2e509b --- /dev/null +++ b/src/theme/font.css @@ -0,0 +1,132 @@ +/* roboto-latin-ext-100-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 100; + src: + local('Roboto Thin'), + local('Roboto-Thin'), + url('./roboto/Roboto-Thin.ttf') format('truetype') +} +/* roboto-latin-ext-100-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 100; + src: + local('Roboto Thin Italic'), + local('Roboto-ThinItalic'), + url('./roboto/Roboto-ThinItalic.ttf') format('truetype') +} +/* roboto-latin-ext-300-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 300; + src: + local('Roboto Light'), + local('Roboto-Light'), + url('./roboto/Roboto-Light.ttf') format('truetype') +} +/* roboto-latin-ext-300-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 300; + src: + local('Roboto Light Italic'), + local('Roboto-LightItalic'), + url('./roboto/Roboto-LightItalic.ttf') format('truetype') +} +/* roboto-latin-ext-400-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + local('Roboto'), + local('Roboto-Regular'), + url('./roboto/Roboto-Regular.ttf') format('truetype') +} +/* roboto-latin-ext-400-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 400; + src: + local('Roboto Italic'), + local('Roboto-Italic'), + url('./roboto/Roboto-Italic.ttf') format('truetype') +} +/* roboto-latin-ext-500-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 500; + src: + local('Roboto Medium'), + local('Roboto-Medium'), + url('./roboto/Roboto-Medium.ttf') format('truetype') +} +/* roboto-latin-ext-500-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 500; + src: + local('Roboto Medium Italic'), + local('Roboto-MediumItalic'), + url('./roboto/Roboto-MediumItalic.ttf') format('truetype') +} +/* roboto-latin-ext-700-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 700; + src: + local('Roboto Bold'), + local('Roboto-Bold'), + url('./roboto/Roboto-Bold.ttf') format('truetype') +} +/* roboto-latin-ext-700-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 700; + src: + local('Roboto Bold Italic'), + local('Roboto-BoldItalic'), + url('./roboto/Roboto-BoldItalic.ttf') format('truetype') +} +/* roboto-latin-ext-900-normal*/ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-display: swap; + font-weight: 900; + src: + local('Roboto Black'), + local('Roboto-Black'), + url('./roboto/Roboto-Black.ttf') format('truetype') +} +/* roboto-latin-ext-900-italic*/ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-display: swap; + font-weight: 900; + src: + local('Roboto Black Italic'), + local('Roboto-BlackItalic'), + url('./roboto/Roboto-BlackItalic.ttf') format('truetype') +} \ No newline at end of file diff --git a/src/theme/roboto/Roboto-Black.ttf b/src/theme/roboto/Roboto-Black.ttf new file mode 100644 index 0000000..3ecbdef Binary files /dev/null and b/src/theme/roboto/Roboto-Black.ttf differ diff --git a/src/theme/roboto/Roboto-BlackItalic.ttf b/src/theme/roboto/Roboto-BlackItalic.ttf new file mode 100644 index 0000000..44c086c Binary files /dev/null and b/src/theme/roboto/Roboto-BlackItalic.ttf differ diff --git a/src/theme/roboto/Roboto-Bold.ttf b/src/theme/roboto/Roboto-Bold.ttf new file mode 100644 index 0000000..70def3f Binary files /dev/null and b/src/theme/roboto/Roboto-Bold.ttf differ diff --git a/src/theme/roboto/Roboto-BoldItalic.ttf b/src/theme/roboto/Roboto-BoldItalic.ttf new file mode 100644 index 0000000..216f9ce Binary files /dev/null and b/src/theme/roboto/Roboto-BoldItalic.ttf differ diff --git a/src/theme/roboto/Roboto-Italic.ttf b/src/theme/roboto/Roboto-Italic.ttf new file mode 100644 index 0000000..f0f33db Binary files /dev/null and b/src/theme/roboto/Roboto-Italic.ttf differ diff --git a/src/theme/roboto/Roboto-Light.ttf b/src/theme/roboto/Roboto-Light.ttf new file mode 100644 index 0000000..3a03044 Binary files /dev/null and b/src/theme/roboto/Roboto-Light.ttf differ diff --git a/src/theme/roboto/Roboto-LightItalic.ttf b/src/theme/roboto/Roboto-LightItalic.ttf new file mode 100644 index 0000000..983381b Binary files /dev/null and b/src/theme/roboto/Roboto-LightItalic.ttf differ diff --git a/src/theme/roboto/Roboto-Medium.ttf b/src/theme/roboto/Roboto-Medium.ttf new file mode 100644 index 0000000..284b1ba Binary files /dev/null and b/src/theme/roboto/Roboto-Medium.ttf differ diff --git a/src/theme/roboto/Roboto-MediumItalic.ttf b/src/theme/roboto/Roboto-MediumItalic.ttf new file mode 100644 index 0000000..a0b10d2 Binary files /dev/null and b/src/theme/roboto/Roboto-MediumItalic.ttf differ diff --git a/src/theme/roboto/Roboto-Regular.ttf b/src/theme/roboto/Roboto-Regular.ttf new file mode 100644 index 0000000..500b104 Binary files /dev/null and b/src/theme/roboto/Roboto-Regular.ttf differ diff --git a/src/theme/roboto/Roboto-Thin.ttf b/src/theme/roboto/Roboto-Thin.ttf new file mode 100644 index 0000000..0c7d50b Binary files /dev/null and b/src/theme/roboto/Roboto-Thin.ttf differ diff --git a/src/theme/roboto/Roboto-ThinItalic.ttf b/src/theme/roboto/Roboto-ThinItalic.ttf new file mode 100644 index 0000000..277d8cf Binary files /dev/null and b/src/theme/roboto/Roboto-ThinItalic.ttf differ diff --git a/yarn.lock b/yarn.lock index ebfd6be..84d1d83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5431,11 +5431,6 @@ follow-redirects@^1.0.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== -fontsource-roboto@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/fontsource-roboto/-/fontsource-roboto-3.1.5.tgz#d5da8bac968db7911e20fd2fb6c227d405f86cba" - integrity sha512-DXSE7/F/6AsKcRJX4VSi3bGrEx0xiaqieeV2W7UH9JFk6tt1U86NoWwy2iNPoUzGtEyQsasilwhTrMJm7wM+Ew== - for-in@^0.1.3: version "0.1.8" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"