Skip to content

Commit

Permalink
Extension localization (#29)
Browse files Browse the repository at this point in the history
* Delete font files

* Use extension-bundled font files

* Add fallback fonts when ProximaNova is not available.

* Remove fonts from build too.

* Re-add fonts for dev workflow.
  • Loading branch information
sammacbeth authored Apr 18, 2023
1 parent e1f15a8 commit 00f259e
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 173 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ __diff_output__
/playwright-report/
/playwright/.cache/
build/app/html/iframe.html
build/app/public/font
Binary file removed build/app/font/ProximaNova-Bold-webfont.woff2
Binary file not shown.
Binary file removed build/app/font/ProximaNova-Reg-webfont.woff
Binary file not shown.
Binary file removed build/app/font/ProximaNova-Reg-webfont.woff2
Binary file not shown.
Binary file removed build/app/font/ProximaNova-Sbold-webfont.woff
Binary file not shown.
4 changes: 2 additions & 2 deletions build/app/public/css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
*/
@font-face {
font-family: "DDG_ProximaNova";
src: url("../../font/ProximaNova-Reg-webfont.woff") format("woff");
src: url("/public/font/ProximaNova-Reg-webfont.woff") format("woff");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "DDG_ProximaNova";
src: url("../../font/ProximaNova-Sbold-webfont.woff") format("woff");
src: url("/public/font/ProximaNova-Sbold-webfont.woff") format("woff");
font-weight: 600;
font-style: bold;
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"test.int.update-screenshots": "npm run test.int -- --update-snapshots",
"test.int-debug": "playwright test --headed --debug",
"test.clean-tree": "npm run build && sh scripts/check-for-changes.sh",
"verify.local": "npm run lint.fix; npm run prettier.fix; npm run test.unit; npm run build; npm run docs; npm run test.int"
"verify.local": "npm run lint.fix; npm run prettier.fix; npm run test.unit; npm run build; npm run docs; npm run test.int",
"fetch-fonts": "mkdir -p build/app/public/font && curl -o build/app/public/font/ProximaNova-Reg-webfont.woff https://duckduckgo.com/font/ProximaNova-Reg-webfont.woff && curl -o build/app/public/font/ProximaNova-Sbold-webfont.woff https://duckduckgo.com/font/ProximaNova-Sbold-webfont.woff"
},
"devDependencies": {
"@babel/cli": "^7.19.3",
Expand Down
Binary file removed shared/font/ProximaNova-Bold-webfont.woff2
Binary file not shown.
Binary file removed shared/font/ProximaNova-Reg-webfont.woff
Binary file not shown.
Binary file removed shared/font/ProximaNova-Reg-webfont.woff2
Binary file not shown.
Binary file removed shared/font/ProximaNova-Sbold-webfont.woff
Binary file not shown.
168 changes: 0 additions & 168 deletions shared/html/iframe.html

This file was deleted.

4 changes: 2 additions & 2 deletions shared/scss/base/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
*/
@font-face {
font-family: 'DDG_ProximaNova';
src: url('../../font/ProximaNova-Reg-webfont.woff') format('woff');
src: url('/public/font/ProximaNova-Reg-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'DDG_ProximaNova';
src: url('../../font/ProximaNova-Sbold-webfont.woff') format('woff');
src: url('/public/font/ProximaNova-Sbold-webfont.woff') format('woff');
font-weight: 600;
font-style: bold;
}
Expand Down

0 comments on commit 00f259e

Please sign in to comment.