refactor: replace google fonts with local fonts

This commit is contained in:
qier222 2021-05-19 00:04:53 +08:00
parent 41a30a25c0
commit e57847c6e1
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D
13 changed files with 42 additions and 1 deletions

View File

@ -98,7 +98,48 @@ export default {
</script>
<style lang="scss">
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500;1,600;1,700;1,800;1,900&display=swap');
/* url('~@/assets/fonts/Barlow-Medium.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-SemiBold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Bold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-ExtraBold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Black.woff2') format('woff2'); */
@font-face {
font-family: 'Barlow';
font-weight: normal;
src: url('~@/assets/fonts/Barlow-Regular.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-weight: medium;
src: url('~@/assets/fonts/Barlow-Medium.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Medium.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-weight: 600;
src: url('~@/assets/fonts/Barlow-SemiBold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-SemiBold.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-weight: bold;
src: url('~@/assets/fonts/Barlow-Bold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Bold.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-weight: 800;
src: url('~@/assets/fonts/Barlow-ExtraBold.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-ExtraBold.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-weight: 900;
src: url('~@/assets/fonts/Barlow-Black.woff2') format('woff2'),
url('~@/assets/fonts/Barlow-Black.ttf') format('truetype');
}
:root {
--color-body-bg: #ffffff;

BIN
src/assets/fonts/Barlow-Black.ttf Executable file

Binary file not shown.

Binary file not shown.

BIN
src/assets/fonts/Barlow-Bold.ttf Executable file

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 not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.