-
Notifications
You must be signed in to change notification settings - Fork 204
[성능 베이스캠프 미션] 병민(윤병인) 미션 제출합니다. #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 23 commits
08bb90f
de7d9ee
a5d9140
b288088
8854693
f537499
1866a85
20d92db
280b570
6b30115
ab562c3
14114d8
e4a6d32
804519c
c9387e5
72ad55c
18926ae
bc88dd1
0dd0d9b
80edbf2
ca79ac8
5986c2c
89f1129
1167829
38b364f
cadfde4
c2770a8
d91ca57
9ca8935
569dd4d
60cffe5
c4810fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,43 @@ | |
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
| <link rel="icon" href="./public/favicon.ico" /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" | ||
| rel="stylesheet" | ||
| rel="preload" | ||
| href="static/josefin-sans-400-700-normal.woff2" | ||
| as="font" | ||
| type="font/woff2" | ||
| crossorigin="anonymous" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a : 하나 배워갑니다. 정말 crossorigin 속성을 제거하니, 브라우저에서 2번 폰트를 요청하게 되네요. 폰트 하나를 적용하는데도 신경 많이 쓴것이 코드에서 보이네요. |
||
| /> | ||
| <link | ||
| rel="preload" | ||
| href="static/josefin-sans-400-700-italic.woff2" | ||
| as="font" | ||
| type="font/woff2" | ||
| crossorigin="anonymous" | ||
| /> | ||
| <style> | ||
| /* font */ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. r : 불필요한 주석이라고 생각합니다. @font-face로 충분히 작성자에게 정보를 제공한다고 생각합니다. 어떻게 생각하시나요?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 동의합니다! 👍
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니다 :D |
||
| @font-face { | ||
| font-family: 'Josefin Sans'; | ||
| font-style: normal; | ||
| font-weight: 400 700; | ||
| font-display: swap; | ||
| src: url(static/josefin-sans-400-700-normal.woff2) format('woff2'); | ||
| unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a : unicode range...까지 적용하셨네요.😎
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 제가 설정한것은 아니고 구글에서 설정한것을 그대로 복붙한겁니다 ㅎㅎ
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니다 :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 확인했습니다~ |
||
| U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
| } | ||
| @font-face { | ||
| font-family: 'Josefin Sans'; | ||
| font-style: italic; | ||
| font-weight: 400 700; | ||
| font-display: swap; | ||
| src: url(static/josefin-sans-400-700-italic.woff2) format('woff2'); | ||
| unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, | ||
| U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
| } | ||
| </style> | ||
| <title>memegle - gif search engine for you</title> | ||
| </head> | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a : 폰트를 preload하니, 확실히 FOUT에서 오는 불편함이 해소되기는 하네요.👍
질문 드리고 싶은게 있습니다.
프로젝트 상으로는, 두 개의 웹 폰트(normal, italic)를 로드하고 있습니다.
컨텐츠를 많이 보여주는 사이트인 경우, 페이지에서 다양한 웹 폰트를 사용할 수도 있다고 생각하는데요. 이 경우 웹 폰트 로드 전략은 어떻게 가져가실 건지 궁금합니다.
만약 모든 폰트를 preload하지 않는다고 한다면, preload하지 않은 폰트가 적용된 텍스트는 어떤식으로 UX를 개선할지 궁금합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
갆같은 폰트는 한글 폰트에서 제외할것 같아요간호사라는 말을 입력할때갆을 한번 거치는데 이때 이 글자가 안보일것이기 때문에 이런 경우에는 그냥 한글 폰트 최적화 안하고 그냥 사용할것 같아요혹시 록바가 생각하는 좋은 아이디어가 있나요?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금 다시보니 잘못 작성했네요~ FOUT(flash of unstyled text) -> FOIT(flash of invisible text) 였네요.
상황별로 자세하게 적어주셔서 감사합니다.
갑자기 뺙 하고 폰트가 변하는것이 사용자에게 더 안좋은 경험을 끼칠 수 있다고 생각해요.저도 공감합니다. 폰트 관련해서 기술 블로그를 보다가 좋은 라이브러리가 존재하더라고요.
Font Face Observer라는 라이브러리인데, 해당 라이브러리를 사용하면 웹 폰트가 로드가 완료되는 시점을 파악할 수 있어요.폰트가 로드가 완료되었을 경우, 해당 DOM 요소에 class를 주고
font-loaded가 되었을 때 스무스하게 폰트가 적용되는 transition을 적용하면 갑자기 뺙 하고 폰트가 변하지는 않을 것 같네요.
관련 블로그