-
Notifications
You must be signed in to change notification settings - Fork 127
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
Address #171 #172
base: main
Are you sure you want to change the base?
Address #171 #172
Conversation
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.
@import
is only necessary when you are using a font that is not a system font. If you have installed the font, there is not need to @import
it from an external source. Note that if you only downloaded the font but didn't install it, you still need to @import
the downloaded font files. I don't know how to express these rules clearly here. It is probably too much for this section and deserves another section (or appendix)...
You are absolutely correct in #171 that there is still a lot of room for improving the documentation. CSS is definitely not a small topic :)
Thank you!
Thanks for the comment @yihui. Shall I modify the PR accordingly?
Seems so. I searched in vain for good links to include that may help people learn about the topic but found little that was unambiguously useful, other than that |
I often look up things on w3schools, too. I think its HTML/CSS tutorials are fine. We can leave PR open for now. Someday we might work on a whole book on pagedown (one of the motivations is exactly that CSS is a huge topic), and we can revisit it at that time. Thank you! |
Dealing with fonts is definitely difficult, moreover with pagedown. They are revealed through the stylesheet available at https://fonts.googleapis.com/css?family=Comic+Neue: @font-face {
font-family: 'Comic Neue';
font-style: normal;
font-weight: 400;
src: local('Comic Neue Regular'), local('ComicNeue-Regular'), url(https://fonts.gstatic.com/s/comicneue/v1/4UaHrEJDsxBrF37olUeD96rp5w.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;
} Here are the two main problems I faced. First problem: font version As one can see in the Second problem: font weights and font styles By default, only one font file is downloaded (the normal style & normal weight). The browser simulates bold and italics from this file. IMO, the safest way to deal with fonts is to download the font files, add them to the project and add CSS font face stylesheets. In order to do that, I recently used the gfonts package developed by @pvictor and was quite happy. |
No description provided.