Skip to content
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

Drop FontAwesome static/webfonts file copies, mount package #1164

Merged
merged 2 commits into from
Aug 15, 2022

Conversation

chalin
Copy link
Collaborator

@chalin chalin commented Aug 15, 2022

Preview:


This appropriately updates the webfont files and has no other (non-trivial) effect:

$ (cd userguide/public && g diff) | grep ^diff                   
diff --git a/scss/main.css b/scss/main.css
diff --git a/scss/main.css.map b/scss/main.css.map
diff --git a/webfonts/fa-brands-400.eot b/webfonts/fa-brands-400.eot
diff --git a/webfonts/fa-brands-400.svg b/webfonts/fa-brands-400.svg
diff --git a/webfonts/fa-brands-400.ttf b/webfonts/fa-brands-400.ttf
diff --git a/webfonts/fa-brands-400.woff b/webfonts/fa-brands-400.woff
diff --git a/webfonts/fa-brands-400.woff2 b/webfonts/fa-brands-400.woff2
diff --git a/webfonts/fa-regular-400.eot b/webfonts/fa-regular-400.eot
diff --git a/webfonts/fa-regular-400.svg b/webfonts/fa-regular-400.svg
diff --git a/webfonts/fa-regular-400.ttf b/webfonts/fa-regular-400.ttf
diff --git a/webfonts/fa-regular-400.woff b/webfonts/fa-regular-400.woff
diff --git a/webfonts/fa-regular-400.woff2 b/webfonts/fa-regular-400.woff2
diff --git a/webfonts/fa-solid-900.eot b/webfonts/fa-solid-900.eot
diff --git a/webfonts/fa-solid-900.svg b/webfonts/fa-solid-900.svg
diff --git a/webfonts/fa-solid-900.ttf b/webfonts/fa-solid-900.ttf
diff --git a/webfonts/fa-solid-900.woff b/webfonts/fa-solid-900.woff
diff --git a/webfonts/fa-solid-900.woff2 b/webfonts/fa-solid-900.woff2
$ (cd userguide/public && g diff -- ':(exclude)*.map' ':(exclude)*webfonts*.*')       
diff --git a/scss/main.css b/scss/main.css
index 3271e7d..4a6d82b 100644
--- a/scss/main.css
+++ b/scss/main.css
@@ -6,17 +6,16 @@ Add styles or override variables from the theme here.
 Bootstrap variables overrides for theme.
 See https://github.com/twbs/bootstrap/pull/23260
 */
-@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i&display=swap");
-@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v27.0.1/dist/font-face.css");
-@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap");
-@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap");
-@fa-font-path :        "../webfonts";
 /*!
  * Bootstrap v4.6.1 (https://getbootstrap.com/)
  * Copyright 2011-2021 The Bootstrap Authors
  * Copyright 2011-2021 Twitter, Inc.
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */
+@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i&display=swap");
+@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v27.0.1/dist/font-face.css");
+@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap");
+@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap");
 :root {
   --blue: #72A1E5;
   --indigo: #6610f2;

In the diff above, the @imports are the same, they've just moved slightly because we dropped the @fa-font-path line.

@chalin chalin changed the title Drop FontAwesome static/webfonts Drop FontAwesome static/webfonts file copies, mount package Aug 15, 2022
@chalin chalin marked this pull request as ready for review August 15, 2022 14:48
@chalin chalin marked this pull request as draft August 15, 2022 15:17
@chalin
Copy link
Collaborator Author

chalin commented Aug 15, 2022

Ok, I tested the use of this PR over the https://github.com/open-telemetry/opentelemetry.io. We can see that the webfont files get updated:

$ cd themes/docsy && git switch chalin-im-drop-webfonts-2022-08-15
$ GET="no" npm run check-links
...
$ npm run cd:public -- git diff | grep ^diff | grep webfont                                         
diff --git a/webfonts/fa-brands-400.eot b/webfonts/fa-brands-400.eot
diff --git a/webfonts/fa-brands-400.svg b/webfonts/fa-brands-400.svg
diff --git a/webfonts/fa-brands-400.ttf b/webfonts/fa-brands-400.ttf
diff --git a/webfonts/fa-brands-400.woff b/webfonts/fa-brands-400.woff
diff --git a/webfonts/fa-brands-400.woff2 b/webfonts/fa-brands-400.woff2
diff --git a/webfonts/fa-regular-400.eot b/webfonts/fa-regular-400.eot
diff --git a/webfonts/fa-regular-400.svg b/webfonts/fa-regular-400.svg
diff --git a/webfonts/fa-regular-400.ttf b/webfonts/fa-regular-400.ttf
diff --git a/webfonts/fa-regular-400.woff b/webfonts/fa-regular-400.woff
diff --git a/webfonts/fa-regular-400.woff2 b/webfonts/fa-regular-400.woff2
diff --git a/webfonts/fa-solid-900.eot b/webfonts/fa-solid-900.eot
diff --git a/webfonts/fa-solid-900.svg b/webfonts/fa-solid-900.svg
diff --git a/webfonts/fa-solid-900.ttf b/webfonts/fa-solid-900.ttf
diff --git a/webfonts/fa-solid-900.woff b/webfonts/fa-solid-900.woff
diff --git a/webfonts/fa-solid-900.woff2 b/webfonts/fa-solid-900.woff2

And the FA icons continue to display fine.

@chalin chalin marked this pull request as ready for review August 15, 2022 15:30
@chalin chalin merged commit b683d6e into google:main Aug 15, 2022
@chalin chalin deleted the chalin-im-drop-webfonts-2022-08-15 branch August 15, 2022 15:31
@chalin
Copy link
Collaborator Author

chalin commented Aug 15, 2022

I'm unsure how this will affect Docsy via Hugo Modules. @deining WDYT?

@chalin
Copy link
Collaborator Author

chalin commented Aug 15, 2022

fekete-robert pushed a commit to fekete-robert/docsy that referenced this pull request Sep 13, 2022
)

* Drop FontAwesome static/webfonts
* Mount webfonts from package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font Awesome static files seem 3 years old?
2 participants