How to use obj style with @font-face
See original GitHub issueI’m trying to do this:
<Global
styles={{
'@font-face': {
fontFamily: 'Iosevka',
src: 'url(woff2/iosevka-thinitalic.woff2) format(woff2)',
},
}}
/>
Description:
I can’t figure out if the src
part needs to be a string like above, or 'url(\'fonts..\') format(\'..\')
or something else?
Documentation links:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
FontFace() - Web APIs - MDN Web Docs
Specifies a font family name that can be used to match against this font face when styling elements. Takes the same type of...
Read more >Font-Face changing via JavaScript - css - Stack Overflow
You can create a new <style> element with the @font-face rule and append it to the document 's head : var newStyle =...
Read more >FontFace · WebPlatform Docs
This is pretty straightforward; you create a FontFace with the JavaScript new keyword as you would any other object. var f = new...
Read more >How To Define Custom Fonts in CSS with @font-face and font ...
In this step, we will apply our downloaded fonts using the @font-face property. Using nano or your preferred text editor, create and open...
Read more >CSS @font-face Rule - W3Schools
In the @font-face rule you must first define a name for the font (e.g. myFirstFont), and then point to the font file. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are probably looking for this:
How do you load multiple styles of the same font-family in object notation?