This repository has been archived by the owner on Nov 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Oswald doesn't fetch #27
Comments
Will be fixing this soon! We are very busy so any help would be greatly appreciated :D |
I was thinking i was crazy, i am glad i am not alone. |
Same issue with any font family name containing space character, such as "EB Garamond" |
Problem is in merge-css.js on line 41 it happens when only url is available, no local versions, and it gets shifted in name generation, so items array is empty. we need new name generator. i have good results when i changed the function to this function getLines(data) {
const lines = {}
const name = {}
data.split(`\n`).forEach(line => {
line = line.trim()
if (line.indexOf(`font-family:`) === 0) {
name.family = line
.replace(`;`, ``)
.replace(`font-family:`, ``)
.replace(/'/g, ``)
.trim()
}
if (line.indexOf(`font-style:`) === 0) {
name.style = line
.replace(`;`, ``)
.replace(`font-style:`, ``)
.replace(/'/g, ``)
.trim()
}
if (line.indexOf(`font-weight:`) === 0) {
name.weight = line
.replace(`;`, ``)
.replace(`font-weight:`, ``)
.replace(/'/g, ``)
.trim()
}
if (line.indexOf(`src:`) === 0) {
let items = line
.replace(`;`, ``)
.replace(`src:`, ``)
.split(`,`)
.map(item => item.trim())
lines[`${name.family} ${name.style} ${name.weight}`] = {
items,
line: line.replace(`;`, ``),
}
}
})
return lines
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
No matter what combination of variants / subsets I can never get Oswald to pre-fetch, there are no errors logged in the process it just silently doesnt fetch the font.
If I change the name to 'oswald' rather than 'Oswald' I see errors in terminal whilst running
gatsby develop
where the response from Google has returned a 400.from
gatsby-config.js
The text was updated successfully, but these errors were encountered: