Feature request or idea? Consider opening an
API review!
We are adding fonts from our assets to the stripe elements in the following manner:
const fonts = [{
family: 'Fakt Pro Normal',
src: `url(${Assets.lookup('faktpro/FaktProWeb-Normal.woff')})`
}];
<Elements
locale={this.props.session.language}
fonts={fonts}
>
In our development environment we are not going through https, so we are getting an error, see below.

Hi @cleemputc, thanks for reporting this!
We definitely understand that it's annoying to need to use https in your dev environment. We have thought about adding http font support just for testmode. But we were worried that developers would see that their integration works in testmode, then deploy to production and be surprised when their http fonts stopped working. We strive to avoid having validation rules that change across environment for exactly that reason, because of how many people have been tricked by similar problems in the past.
(I don't know if this is possible for your specific case, but I often use ngrok when I need an https connection to localhost.)
Thank you for your reply, I can understand your reasoning, however when the fonts fail to load like above, or maybe in other circumstances too, f.e. cdn is down, any interaction with the element is also blocked.
I've got to concur with cleemputc, this makes it next to impossible to do any kind of useful debugging on localhost. At the least, just ignore the font. Not being able to interact with the element is just a non-starter
@asolove-stripe Why is this not a very bold gotcha in the documentation??! It' always painful when issues where you're facing a dilemma (.."we were worried that developers would see that their integration works in testmode"...) are not made clear very early on so that everyone doesn't have to go through one of the two painful misunderstandings!
Hi all, just a quick update here. There are two issues and one is not fixable but the other is now fixed!
Hope this prevents future pain for people trying to test this out. And if you need a way to try out fonts locally, I still recommend ngrok as a service that can generate you an https proxy in front of whatever your local development environment is.
Most helpful comment
Thank you for your reply, I can understand your reasoning, however when the fonts fail to load like above, or maybe in other circumstances too, f.e. cdn is down, any interaction with the element is also blocked.