-
Notifications
You must be signed in to change notification settings - Fork 9
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
195 added all Stanford approved fonts #248
Conversation
@@ -300,139 +300,181 @@ template { | |||
|
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.
All the fonts rendered for me in the compiled styleguide with no issues - looks great.
I was scrolling down the diff page on github and saw the file size differences below of fonts removed. For the same font variant, eg:
BIN -91.6 KB core/fonts/crimsontext-bold-webfont.ttf
BIN -41.3 KB core/fonts/crimsontext-bold-webfont.woff
Looks like the woff format in general is about half of that of ttf files. Would that be a reason to keep the woff files instead of the ttf ones?
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.
Nice find! This encouraged me to do a little more looking into the file extensions. WOFF is basically OTF or TTF with metadata and compression supported by all major browsers. Because the fonts are compressed, they load faster. This indeed is a reason to use WOFF over TTF. I'll compress the files and upload the new versions.
core/templates/core/fonts/fonts.twig
Outdated
<h5>{{ heading }} 5</h5> | ||
<h6>{{ heading }} 6</h6> | ||
{{ paragraph }} | ||
<p class="su-font-lead">Roboto Slab is a secondary font and should be used as a display font.</p> | ||
<h3>Style Variations</h3> | ||
<div style="font-weight: 100; font-style: normal;">Thin</div> |
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.
It looks like there are only 3 font-weights for Roboto Slab in Figma (no "thin" variant) so perhaps Figma needs to be updated or do we need the "thin" variant for Decanter?
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 verified with the designers that they DO NOT want the thin variation to be included. Good eye! I'll remove this variation file and font call.
@@ -300,139 +300,187 @@ template { | |||
|
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.
Scott and John would prefer to load all fonts that are available on Google from Google. We should only be hosting fonts that aren't available from Google.
An open question is where / how to host them. If we just bundle them into Decanter, then people building sites on Decanter will have to deploy them to every site. I think it would be better to host them on Stanford's homesite (more specifically, the S3 bucket that serves many of homesite's assets), and have all Decanter-based sites refer to a single source.
I've put Stanford's ligature font (for the wordmark) in https://www-media.stanford.edu/assets/fonts/Stanford.woff & https://www-media.stanford.edu/assets/fonts/Stanford.ttf . If you could tell me what fonts aren't available from Google, I'll put them in the same directory. Then you can update Decanter to load them from there.
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.
All of the fonts pictured below are now available in https://www-media.stanford.edu/assets/fonts/ :
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.
Thanks, JB!
Co-Authored-By: josephgknox <[email protected]>
Co-Authored-By: josephgknox <[email protected]>
Co-Authored-By: josephgknox <[email protected]>
When I pull this branch, do
I do not get that error for any of the other fonts hosted in https://www-media.stanford.edu/assets/fonts/ . I believe the @sherakama What do we do about this? It's possible that it won't be an issue for actual sites built with decanter, so long as their url is of the form subdomain.stanford.edu . Then they'll be the same domain and shouldn't be affected by CORS. |
At first look, I am not sure why this is popping up. We are pulling font files from Google with the same Referrer policies. The heading I am seeing being sent is |
Also, is |
@@ -87,6 +87,10 @@ dfn { | |||
@include slab; | |||
} | |||
|
|||
.su-script { | |||
@include script; |
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 did a bit of checking and I cannot find anything that would say that script
is a reserved language keyword. As this may be confused with scripting files perhaps we could come up with a slightly different name?
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.
Changed to handwriting
.
@@ -26,6 +25,10 @@ | |||
font-family: $font-slab; | |||
} | |||
|
|||
.su-script & { |
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.
Is this missing something after the &
?
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.
Nope. It's in place so that it wraps the declaration before it.
border-bottom: none; | ||
font-weight: $font-bold; | ||
} | ||
font-family: $font-sans; |
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.
Ooo thank you for cleaning this up. This was bugging me.
* master: 122 hero (#259) 195 added all Stanford approved fonts (#248) change class for logo to match new naming conventions. (#257) # Conflicts: # core/css/decanter.css - regenerated using mine # core/scss/utilities/mixins/typography/_font-lead.scss - resolved using mine # core/scss/utilities/mixins/typography/_h6.scss - deleted
* master: reversed order of modular scale type mixin (#260) 122 hero (#259) 195 added all Stanford approved fonts (#248) change class for logo to match new naming conventions. (#257) px to rem (#256) 219 Modular typography (#250) fixup! wip. (#255) 79 card (#241) make color change on hover & focus less abrupt (#253)
* master: 216 Create site search component (#262) 266: Update scss file to reference logo.twig and update twig file to … (#267) 246 homepage (#258) reversed order of modular scale type mixin (#260) 122 hero (#259) 195 added all Stanford approved fonts (#248) change class for logo to match new naming conventions. (#257) px to rem (#256) 219 Modular typography (#250) fixup! wip. (#255) 79 card (#241) make color change on hover & focus less abrupt (#253) 249: Change CTA icon to a variable (#251) 223 brand bar (#243) # Conflicts: # core/css/decanter.css # core/scss/components/index.scss # core/templates/components/logo/logo.twig
READY FOR REVIEW
Summary
Needed By (Date)
Urgency
Steps to Test
grunt styleguide
)Affected Projects or Products
Associated Issues and/or People
See Also