Clean up Fonts.js (#1080)

* fix issue 1078

* update integration test oo
main
Michael Fix 4 years ago committed by GitHub
parent f934296b93
commit d3e48d88fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,8 +13,6 @@ export default () => (
font-display: swap; font-display: swap;
src: url('//cdn.jsdelivr.net/npm/@typopro/web-iosevka@3.7.5/TypoPRO-iosevka-term-bold.woff') src: url('//cdn.jsdelivr.net/npm/@typopro/web-iosevka@3.7.5/TypoPRO-iosevka-term-bold.woff')
format('woff'); format('woff');
font-weight: 400;
font-style: normal;
} }
@font-face { @font-face {
@ -24,8 +22,6 @@ export default () => (
format('woff2'), format('woff2'),
url('//cdn.jsdelivr.net/npm/@typopro/web-monoid@3.7.5/TypoPRO-Monoid-Regular.woff') url('//cdn.jsdelivr.net/npm/@typopro/web-monoid@3.7.5/TypoPRO-Monoid-Regular.woff')
format('woff'); format('woff');
font-weight: 400;
font-style: normal;
} }
@font-face { @font-face {
@ -35,8 +31,6 @@ export default () => (
format('woff2'), format('woff2'),
url('//cdn.jsdelivr.net/npm/@typopro/web-fantasque-sans-mono@3.7.5/TypoPRO-FantasqueSansMono-Regular.woff') url('//cdn.jsdelivr.net/npm/@typopro/web-fantasque-sans-mono@3.7.5/TypoPRO-FantasqueSansMono-Regular.woff')
format('woff'); format('woff');
font-weight: 400;
font-style: normal;
} }
@font-face { @font-face {
@ -46,8 +40,6 @@ export default () => (
format('woff2'), format('woff2'),
url('//cdn.jsdelivr.net/font-hack/2.020/fonts/woff/hack-regular-webfont.woff?v=2.020') url('//cdn.jsdelivr.net/font-hack/2.020/fonts/woff/hack-regular-webfont.woff?v=2.020')
format('woff'); format('woff');
font-weight: 400;
font-style: normal;
} }
@font-face { @font-face {
@ -57,15 +49,11 @@ export default () => (
format('woff2'), format('woff2'),
url('//cdn.rawgit.com/tonsky/FiraCode/1.204/distr/woff/FiraCode-Regular.woff') url('//cdn.rawgit.com/tonsky/FiraCode/1.204/distr/woff/FiraCode-Regular.woff')
format('woff'); format('woff');
font-weight: 400;
font-style: normal;
} }
@font-face { @font-face {
font-family: 'JetBrains Mono'; font-family: 'JetBrains Mono';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: url('//cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') src: url('//cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2')
format('woff2'), format('woff2'),
url('//cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff') url('//cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff')
@ -80,87 +68,60 @@ export default () => (
src: local('IBM Plex Mono Medium Italic'), local('IBMPlexMono-MediumItalic'), src: local('IBM Plex Mono Medium Italic'), local('IBMPlexMono-MediumItalic'),
url(https://fonts.gstatic.com/s/ibmplexmono/v2/-F6sfjptAgt5VM-kVkqdyU8n1ioSJlR1gMoQPttozw.woff2) url(https://fonts.gstatic.com/s/ibmplexmono/v2/-F6sfjptAgt5VM-kVkqdyU8n1ioSJlR1gMoQPttozw.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2191, U + 2193, U + 2212,
U + 2215, U + FEFF, U + FFFD;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Anonymous Pro'; font-family: 'Anonymous Pro';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Anonymous Pro Regular'), local('AnonymousPro-Regular'), src: local('Anonymous Pro Regular'), local('AnonymousPro-Regular'),
url(//fonts.gstatic.com/s/anonymouspro/v11/Zhfjj_gat3waL4JSju74E3n3cbdKJftHIk87C9ihfO8.woff2) url(//fonts.gstatic.com/s/anonymouspro/v11/Zhfjj_gat3waL4JSju74E3n3cbdKJftHIk87C9ihfO8.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2212, U + 2215;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Droid Sans Mono'; font-family: 'Droid Sans Mono';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Droid Sans Mono Regular'), local('DroidSansMono-Regular'), src: local('Droid Sans Mono Regular'), local('DroidSansMono-Regular'),
url(//fonts.gstatic.com/s/droidsansmono/v9/ns-m2xQYezAtqh7ai59hJVlgUn8GogvcKKzoM9Dh-4E.woff2) url(//fonts.gstatic.com/s/droidsansmono/v9/ns-m2xQYezAtqh7ai59hJVlgUn8GogvcKKzoM9Dh-4E.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2212, U + 2215;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Inconsolata'; font-family: 'Inconsolata';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Inconsolata Regular'), local('Inconsolata-Regular'), src: local('Inconsolata Regular'), local('Inconsolata-Regular'),
url(//fonts.gstatic.com/s/inconsolata/v16/BjAYBlHtW3CJxDcjzrnZCIgp9Q8gbYrhqGlRav_IXfk.woff2) url(//fonts.gstatic.com/s/inconsolata/v16/BjAYBlHtW3CJxDcjzrnZCIgp9Q8gbYrhqGlRav_IXfk.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2212, U + 2215;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Code Pro'; font-family: 'Source Code Pro';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Source Code Pro'), local('SourceCodePro-Regular'), src: local('Source Code Pro'), local('SourceCodePro-Regular'),
url(//fonts.gstatic.com/s/sourcecodepro/v7/mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2) url(//fonts.gstatic.com/s/sourcecodepro/v7/mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2212, U + 2215;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Ubuntu Mono'; font-family: 'Ubuntu Mono';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Ubuntu Mono'), local('UbuntuMono-Regular'), src: local('Ubuntu Mono'), local('UbuntuMono-Regular'),
url(//fonts.gstatic.com/s/ubuntumono/v7/ViZhet7Ak-LRXZMXzuAfkYgp9Q8gbYrhqGlRav_IXfk.woff2) url(//fonts.gstatic.com/s/ubuntumono/v7/ViZhet7Ak-LRXZMXzuAfkYgp9Q8gbYrhqGlRav_IXfk.woff2)
format('woff2'); format('woff2');
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6, U + 02da,
U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2212, U + 2215;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Space Mono'; font-family: 'Space Mono';
font-display: swap; font-display: swap;
font-style: normal;
font-weight: 400;
src: local('Space Mono'), local('SpaceMono-Regular'), src: local('Space Mono'), local('SpaceMono-Regular'),
url(https://fonts.gstatic.com/s/spacemono/v2/i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2) url(https://fonts.gstatic.com/s/spacemono/v2/i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2)
format('woff2'); format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
`} `}
</style> </style>

@ -12,11 +12,11 @@ describe('Gist', () => {
cy.get('#downshift-input-JavaScript').should('have.value', 'JavaScript') cy.get('#downshift-input-JavaScript').should('have.value', 'JavaScript')
}) })
const pages = ['/', '/embed/'] const pages = ['/', '/embed/', '/82d742f4efad9757cc826d20f2a5e5af']
pages.forEach(page => { pages.forEach(page => {
test(`${page} should not contain a query string in the url`, () => { test(`${page} should not contain a query string in the url`, () => {
cy.visit('/82d742f4efad9757cc826d20f2a5e5af') cy.visit(page)
cy.url().should('not.contain', '?') cy.url().should('not.contain', '?')
}) })

Loading…
Cancel
Save