Comments (6)
@dpup Any chance of a link to a repo or more details on your setup? When I set up a Gatsby project and add a CSS file with the following content + your config above:
@font-face {
font-family: 'Roboto';
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2)
format('woff2');
}
:root {
font-family: 'Roboto', sans-serif;
}
It produces the following output, as it should:
<!-- rest of page -->
<style data-href="/styles.8b00eb46f301f9f1eedb.css" data-identity="gatsby-global-css">
@font-face {
ascent-override: 92.7734375%;
descent-override: 24.4140625%;
font-family: Roboto override;
line-gap-override: 0%;
src: local("BlinkMacSystemFont"), local("Segoe UI"), local("Helvetica Neue"), local("Arial"), local("Noto Sans")
}
@font-face {
font-display: swap;
font-family: Roboto;
src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format("woff2")
}
:root {
font-family: Roboto, Roboto override, sans-serif
}
</style>
<!-- rest of page -->
from fontaine.
Good to know it should work. Our project is rather large.
Do you have an example for use with Sass? That would be my next guess.
from fontaine.
You're quite right; that was the issue. Pushing a fix.
from fontaine.
Let me know if it isn't resolved and I'll happily reopen. 🙏
from fontaine.
Awesome. Thanks for the speedy turnaround.
from fontaine.
No problem! Don't hesitate to let me know if there's anything else you spot.
from fontaine.
Related Issues (12)
- Need help configuring vite.config.mjs
- getMetricsForFamily returns null for font families containing multiple spaces (e.g., "IBM Plex Mono")
- getMetricsForFamily returns null for all fonts on 0.3.0 HOT 3
- CLI/programmatic usage HOT 2
- Customize the font overridden name HOT 3
- Dependency Dashboard
- expose as postcss plugin HOT 1
- Parse font faces and consider font weight HOT 10
- offer 'minimal' installation
- add framework examples HOT 5
- enable `size-adjust` metric calculation HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontaine.