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

Remove duplicate fonts #4004

Merged
merged 2 commits into from
Nov 25, 2019
Merged

Conversation

fmarier
Copy link
Member

@fmarier fmarier commented Nov 16, 2019

Fixes brave/brave-browser#6832 and brave/brave-browser#6881.

Submitter Checklist:

Test Plan:

I added some borders in the existing files:

diff --git a/components/fonts/muli.css b/components/fonts/muli.css
index 4652c3a75..9b3b4254d 100644
--- a/components/fonts/muli.css
+++ b/components/fonts/muli.css
@@ -1,3 +1,4 @@
+* { border: 10px solid red !important }
 /* vietnamese */
 @font-face {
     font-family: 'Muli';
diff --git a/ui/webui/resources/fonts/muli.css b/ui/webui/resources/fonts/muli.css
index 578a1ec66..53ec5c8f6 100644
--- a/ui/webui/resources/fonts/muli.css
+++ b/ui/webui/resources/fonts/muli.css
@@ -1,3 +1,4 @@
+* { border: 10px solid blue !important }
 /* vietnamese */
 @font-face {
     font-family: 'Muli';

so that I could see red borders on:

and blue ones on:

  • brave://settings
  • brave://history

After my change, everything looked blue, as expected. I then applied a similar patch for the other font:

diff --git a/components/fonts/poppins.css b/components/fonts/poppins.css
index 82c9931d1..97b27af07 100644
--- a/components/fonts/poppins.css
+++ b/components/fonts/poppins.css
@@ -1,4 +1,4 @@
-
+* { border: 10px solid green !important }
 /* devanagari */
 @font-face {
     font-family: 'Poppins';
diff --git a/ui/webui/resources/fonts/poppins.css b/ui/webui/resources/fonts/poppins.css
index 6221834f6..8519fd548 100644
--- a/ui/webui/resources/fonts/poppins.css
+++ b/ui/webui/resources/fonts/poppins.css
@@ -1,3 +1,4 @@
+* { border: 10px solid yellow !important }
 /* devanagari */
 @font-face {
     font-family: 'Poppins';

and looked for green borders instead of red, and yellow borders instead of blue.

After my patch, everything went yellow as expected, except for WebTorrent which doesn't use Poppins for some reason.

Finally, I also verified that I hadn't broken the following:

  • chrome://brave-resources/fonts/muli.css
  • chrome://brave-resources/fonts/poppins.css

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@fmarier fmarier added this to the 1.3.x - Nightly milestone Nov 16, 2019
@fmarier fmarier self-assigned this Nov 16, 2019
Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewards changes looks good

@fmarier fmarier force-pushed the francois-remove-duplicate-fonts-6832 branch from c0132a4 to 15f8caa Compare November 17, 2019 18:43
@petemill
Copy link
Member

This looks good but I'd like to test out some rendering and webpack bundling, which I won't be able to get to until Wednesday. If it's more pressing than that, go ahead and merge following others' approval and I'll create follow up issues if I find anything.

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmarier
Copy link
Member Author

fmarier commented Nov 18, 2019

This looks good but I'd like to test out some rendering and webpack bundling, which I won't be able to get to until Wednesday. If it's more pressing than that, go ahead and merge following others' approval and I'll create follow up issues if I find anything.

@petemill It can wait until Wednesday, no problems.

…wser#6881)

By moving third-party fonts to the standard directory pattern for
third-party code in Chromium, we don't have to teach the license
script about our extra path.
@fmarier fmarier force-pushed the francois-remove-duplicate-fonts-6832 branch from 15f8caa to d457807 Compare November 18, 2019 22:34
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the rendering, all looks good. Looks like the affected pages weren't optimized to begin with 🤦‍♂, so we're ok.
Thanks for fixing the duplication 🏅

@petemill petemill merged commit f8a2849 into master Nov 25, 2019
@petemill petemill deleted the francois-remove-duplicate-fonts-6832 branch November 25, 2019 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate copies of Google fonts in the repo
4 participants