diff --git a/ui/package.json b/ui/package.json index 008a52d3c..bb951317e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -17,6 +17,7 @@ "copy-to-clipboard": "3.0.8", "fast-deep-equal": "2.0.1", "favico.js": "0.3.10", + "lato-font": "3.0.0", "lodash.debounce": "4.0.8", "lodash.throttle": "4.1.1", "lodash.uniqueid": "4.0.1", diff --git a/ui/src/App.scss b/ui/src/App.scss index d50aed32b..a222b3ad7 100644 --- a/ui/src/App.scss +++ b/ui/src/App.scss @@ -1,3 +1,6 @@ +// bundled Lato font, so we don't need to talk to Google Fonts API +@import "./Fonts.scss"; + // custom "dark" color, little less dark than flatly $blue: #455a64; // body background color should be same as navbar, so it blends into one diff --git a/ui/src/Fonts.scss b/ui/src/Fonts.scss new file mode 100644 index 000000000..cf6072546 --- /dev/null +++ b/ui/src/Fonts.scss @@ -0,0 +1,33 @@ +// this is used by bootswatch to import the font, zero it since we import all +// fonts below +$web-font-path: ""; + +/* Lato (medium, regular) */ +@font-face { + font-family: "Lato"; + font-weight: 400; + font-style: normal; + text-rendering: optimizeLegibility; + src: url("~lato-font/fonts/lato-medium/lato-medium.woff2") format("woff2"), + url("~lato-font/fonts/lato-medium/lato-medium.woff") format("woff"); +} +/* Lato (medium, italic) */ +@font-face { + font-family: "Lato"; + font-weight: 400; + font-style: italic; + text-rendering: optimizeLegibility; + src: url("~lato-font/fonts/lato-medium-italic/lato-medium-italic.woff2") + format("woff2"), + url("~lato-font/fonts/lato-medium-italic/lato-medium-italic.woff") + format("woff"); +} +/* Lato (heavy, regular) */ +@font-face { + font-family: "Lato"; + font-weight: 700; + font-style: normal; + text-rendering: optimizeLegibility; + src: url("~lato-font/fonts/lato-bold/lato-bold.woff2") format("woff2"), + url("~lato-font/fonts/lato-bold/lato-bold.woff") format("woff"); +} diff --git a/ui/yarn.lock b/ui/yarn.lock index 01fe44dee..e00e6d1b9 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -6749,6 +6749,11 @@ last-call-webpack-plugin@^3.0.0: lodash "^4.17.5" webpack-sources "^1.1.0" +lato-font@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lato-font/-/lato-font-3.0.0.tgz#91b837e2374b668fb7331d44c894d37a2d9f8e11" + integrity sha1-kbg34jdLZo+3Mx1EyJTTei2fjhE= + lazy-cache@^0.2.3: version "0.2.7" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65"