Skip to content

Commit

Permalink
refactor: fallback font 지정 및 font-display 속성
Browse files Browse the repository at this point in the history
  • Loading branch information
esthel7 committed Jan 19, 2024
1 parent d57541f commit 90c537e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
6 changes: 4 additions & 2 deletions front/src/GlobalStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ const GlobalStyles = createGlobalStyle`
@font-face {
font-family: 'Pretendard-Regular';
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'KingSejongInstitute';
src: url('/fonts/KingSejongInstitute-Regular.ttf') format('truetype');
src: url('/fonts/KingSejongInstitute-Regular.ttf') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@keyframes fadeIn {
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/SnowGlobeCanvas/models/Bottom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Bottom: React.FC<BottomProps> = ({
width: 1024,
height: 1024,
positionY: 1024 / 8,
font: 'Bold 6.25rem KingSejongInstitute',
font: 'Bold 6.25rem KingSejongInstitute, sans-serit',
fontColor: 'black',
backgGroundColor: 'white'
});
Expand Down
16 changes: 9 additions & 7 deletions front/src/utils/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ const colors = {
const font = {
'--text-shadow':
'-1px 0px black, 0px 1px black, 1px 0px black, 0px -1px black',
'--normal-title-font': 'normal normal 400 2rem/normal "KingSejongInstitute"',
'--normal-title-font':
'normal normal 400 2rem/normal "KingSejongInstitute", sans-serif',
'--normal-introduce-font':
'normal normal 400 1.125rem/150% "KingSejongInstitute"',
'--normal-login-font': 'normal normal 400 1rem/100% "Pretendard-Regular"',
'normal normal 400 1.125rem/150% "KingSejongInstitute", sans-serif',
'--normal-login-font':
'normal normal 400 1rem/100% "Pretendard-Regular", sans-serif',
'--normal-button-font':
'normal normal 400 1.125rem/150% "KingSejongInstitute"',
'normal normal 400 1.125rem/150% "KingSejongInstitute", sans-serif',
'--normal-nickname-font':
'normal normal 400 1.75rem/normal "KingSejongInstitute"',
'normal normal 400 1.75rem/normal "KingSejongInstitute", sans-serif',
'--normal-nickname-input-font':
'normal normal 400 1.5rem/1.25rem "Pretendard-Regular"',
'normal normal 400 1.5rem/1.25rem "Pretendard-Regular", sans-serif',
'--normal-main-header-font':
'normal normal 400 1rem/160% "KingSejongInstitute"'
'normal normal 400 1rem/160% "KingSejongInstitute", sans-serif'
};

const size = {
Expand Down

0 comments on commit 90c537e

Please sign in to comment.