Add FontFace component - #77
Conversation
|
When reviewing especially keep an eye on:
|
|
interesting use of suspense. why not offer |
|
No, it's absolutely a valid comment. In fact, I thought about <FontFace
family="Name"
source="url(path/to/name.woff2) format('woff2'), url(path/to/name.woff) format('woff')" />This is great to provide fallbacks if the preferred format is not supported or to refer to a local font as the primary option. An alternative API could be using <FontFace
family="Name"
source={[
{
url: 'path/to/name.woff2',
format: 'woff2',
},
{
url: 'path/to/name.woff',
format: 'woff',
},
]}
/> |
|
hmm, yea i see. idk, you can also leave it as a string and ask for OSS to write validation regex :) |
|
You do get limited runtime feedback. If you call |
✨ Add FontFace resource
📚 Document
<FontFace \>anduseFontFace👉 Add
<FontFace />exampleResolves #76