mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Font-handling improvements
This commit is contained in:
+1
-1
@@ -16,13 +16,13 @@
|
||||
"@fontsource/noto-sans-tc": "^4.5.5",
|
||||
"@fontsource/nunito-sans": "^4.5.4",
|
||||
"@mdi/js": "^6.5.95",
|
||||
"antar-hinted": "https://dweb.link/ipfs/QmYo4A4dXZoNYo2qWCrBX1cgPpoDKbX2ZWfuEnUH8qPj3G?filename=hinted-antar-web.tar",
|
||||
"axios": "^0.26.1",
|
||||
"core-js": "^3.21.1",
|
||||
"dexie": "^3.2.1",
|
||||
"dompurify": "^2.3.6",
|
||||
"format-duration": "^1.4.0",
|
||||
"i18n-iso-countries": "^6.8.0",
|
||||
"inter-hinted": "https://cf-ipfs.com/ipfs/QmUsL8MbjXkxqkiLDRdnXPn5AxiiG2zfvQuRGeaxJJ76j7?filename=hinted-inter-web.tar",
|
||||
"javascript-time-ago": "^2.3.13",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^3.0.8",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
import 'inter-hinted/inter.css'
|
||||
import 'antar-hinted/antar.css'
|
||||
import '@/styles/main.scss'
|
||||
|
||||
import { i18n, i18nInitialized } from '@/plugins/i18n'
|
||||
|
||||
+7
-11
@@ -128,6 +128,7 @@ async function syncStylesPerLanguage (locale) {
|
||||
case 'ml':
|
||||
case 'tr':
|
||||
case 'cs':
|
||||
case 'ru':
|
||||
case 'bn-Latn':
|
||||
// Don't need to import fonts because Latin fonts are always loaded
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
@@ -135,7 +136,7 @@ async function syncStylesPerLanguage (locale) {
|
||||
break
|
||||
// Bengali script
|
||||
case 'bn-Beng':
|
||||
await import('@fontsource/baloo-da-2/bengali.css')
|
||||
await import('@fontsource/baloo-da-2/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('bengali')
|
||||
break
|
||||
@@ -143,35 +144,30 @@ async function syncStylesPerLanguage (locale) {
|
||||
// NOTE: if you are a native speaker & want to see a different font, just email me or join the channel
|
||||
case 'ar':
|
||||
case 'ckb':
|
||||
await import('@fontsource/noto-naskh-arabic/arabic.css')
|
||||
await import('@fontsource/noto-naskh-arabic/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('arabic-script')
|
||||
break
|
||||
case 'zh-Hant':
|
||||
await import('@fontsource/noto-sans-tc/chinese-traditional.css')
|
||||
await import('@fontsource/noto-sans-tc/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('traditional-chinese')
|
||||
break
|
||||
case 'zh-Hans':
|
||||
await import('@fontsource/noto-sans-sc/chinese-simplified.css')
|
||||
await import('@fontsource/noto-sans-sc/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('simplified-chinese')
|
||||
break
|
||||
case 'ja':
|
||||
await import('@fontsource/noto-sans-jp/japanese.css')
|
||||
await import('@fontsource/noto-sans-jp/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('japanese')
|
||||
break
|
||||
case 'ko':
|
||||
await import('@fontsource/noto-sans-kr/korean.css')
|
||||
await import('@fontsource/noto-sans-kr/index.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('korean')
|
||||
break
|
||||
case 'ru':
|
||||
await import('@fontsource/nunito-sans/cyrillic.css')
|
||||
document.body.classList.remove(...document.body.classList)
|
||||
document.body.classList.add('russian')
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-12
@@ -1,13 +1,15 @@
|
||||
@mixin addFonts ($font-primary) {
|
||||
$font-line: Antar, $font-primary, system-ui, sans-serif;
|
||||
|
||||
.v-application {
|
||||
[class*='text-'],[class*='body-'] {
|
||||
font-family: $font-primary, Inter, system-ui, sans-serif !important;
|
||||
font-family: $font-line !important;
|
||||
}
|
||||
.headline, .title {
|
||||
font-family: $font-primary, Inter, system-ui, sans-serif !important;
|
||||
font-family: $font-line !important;
|
||||
}
|
||||
|
||||
font-family: $font-primary, Inter, system-ui, sans-serif !important;
|
||||
font-family: $font-line !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +19,7 @@
|
||||
}
|
||||
|
||||
.latin {
|
||||
@include addFonts('Inter');
|
||||
|
||||
.v-application {
|
||||
font-feature-settings: "calt", "case", "ccmp", "ss01", "ss02", "ss03";
|
||||
}
|
||||
@include addFonts('Antar');
|
||||
}
|
||||
|
||||
.bengali {
|
||||
@@ -44,10 +42,6 @@
|
||||
@include addFonts('Noto Sans KR');
|
||||
}
|
||||
|
||||
.russian {
|
||||
@include addFonts('Nunito Sans');
|
||||
}
|
||||
|
||||
.arabic-script {
|
||||
@include addFonts('Noto Naskh Arabic');
|
||||
|
||||
|
||||
@@ -1916,6 +1916,10 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
"antar-hinted@https://dweb.link/ipfs/QmYo4A4dXZoNYo2qWCrBX1cgPpoDKbX2ZWfuEnUH8qPj3G?filename=hinted-antar-web.tar":
|
||||
version "0.0.0"
|
||||
resolved "https://dweb.link/ipfs/QmYo4A4dXZoNYo2qWCrBX1cgPpoDKbX2ZWfuEnUH8qPj3G?filename=hinted-antar-web.tar#9cc4bbd581413306a682bdc03f734e7d9494b4fd"
|
||||
|
||||
any-promise@^1.0.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
|
||||
@@ -4025,10 +4029,6 @@ inherits@2.0.3:
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
||||
|
||||
"inter-hinted@https://cf-ipfs.com/ipfs/QmUsL8MbjXkxqkiLDRdnXPn5AxiiG2zfvQuRGeaxJJ76j7?filename=hinted-inter-web.tar":
|
||||
version "0.0.0"
|
||||
resolved "https://cf-ipfs.com/ipfs/QmUsL8MbjXkxqkiLDRdnXPn5AxiiG2zfvQuRGeaxJJ76j7?filename=hinted-inter-web.tar#4cb347da3bfff090be4e56a86ca7d6ab5f6c2dc2"
|
||||
|
||||
internal-slot@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c"
|
||||
|
||||
Reference in New Issue
Block a user