-
Notifications
You must be signed in to change notification settings - Fork 482
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
Use JuliaMono, drop Google Fonts CDN #1569
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
09897ef
Use CDNJS for Lato
mortenpi acb002a
Use Julia Mono for monospace
mortenpi 5216b45
Add monospace font showcase to examples/
mortenpi 86c6588
Clean up juliamono.scss
mortenpi 16352d8
Fix tests
mortenpi 40edac4
Add CHANGELOG
mortenpi acab771
Merge branch 'master' into mp/juliamono
mortenpi 06b0315
Remove vendored JuliaMono CSS
mortenpi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$juliamono-base-url: "https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.037"; | ||
|
||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 300; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-Light.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} | ||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 400; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-Medium.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} | ||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 500; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-SemiBold.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} | ||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 600; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-Bold.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} | ||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 800; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-ExtraBold.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} | ||
@font-face { | ||
font-family: JuliaMono; | ||
font-weight: 900; | ||
font-style: normal; | ||
src: local('JuliaMono'), url("#{$juliamono-base-url}/JuliaMono-Black.woff2") format("woff2"); | ||
text-rendering: optimizeLegibility; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What exactly do these different versions do? For my own website I used the one called
Regular
but that one is not even included here.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.
I've not yet found out how CSS font weights works. :)
In the font file I have these definitions:
Light 300
Regular 400
Medium 500
Semibold 600
Bold 700
Extrabold 800
Black 900
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.
Okay. What determines which one is used? Will all those file be loaded by the browser? And for the case of Documenter, are all of them used?
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.
In my Documenter docs CSS I use just this one:
Probably not a good idea to ask for them all :) (especially on mobile)
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.
For what it's worth, it looks like Chrome at least is smart enough not to download the
.woff2
if you're not actually using it. Currently, with this setup, on the-Medium
is actually loaded, because the code blocks have the (default) weight of400
.That said, I agree that, if we're gonna have the CSS file here, we should only have
-Regular
there. However, @cormullion, what is the actual difference between the.woff2
files of the different weights? Why are you generating different ones in the first place?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.
Each
woff2
file contains the glyph shapes and data for one specific weight, so you need a separate file for each weight. (I think variable fonts might come in one big file, but this isn’t one of those.)