#scmitton

1 messages ยท Page 1 of 1 (latest)

terse currentBOT
normal dawn
#

๐Ÿ‘‹ happy to help

#

would you mind sharing the resources' links that you've used for this?

iron fractal
normal dawn
#

all of the ways I've found in the github issue on this topic, and the methods outlined in the stripe docs
these

iron fractal
normal dawn
#

taking a look give me a couple of minutes

iron fractal
#

Ok, update I tried a different font, and it actually worked. So maybe there's an issue with just that font.

normal dawn
#

yes maybe

#

that's what I was trying to figure out honestly

#

happy it worked out for you

iron fractal
#

Well it's not working with the font I want still. Do you have any suggestions on how to work around that?

normal dawn
#

what is the font that worked for you?

iron fractal
#

Open Sans worked, but Source Sans 3 has not

normal dawn
#

would you mind sharing the link?

#

the cssSrc

normal dawn
#

Open sans is already part of the default font family

#

I don't think it worked

iron fractal
#

I tried loading Source Sans 3 from type kit, and it looks to have worked

normal dawn
#

actually I go it working with this

{
  appearance: {
    theme: 'stripe',
    variables: {
      fontFamily: 'Source Sans 3'
    },
  },
  fonts: [{ cssSrc: "https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400&display=swap" }]
}
iron fractal
#

And you pass this as options to Elements? I'm using CardElement btw

hallow plinth
iron fractal
#

It says to customize fonts by initializing Elements with a font set

hallow plinth
#

Yup, I'd recommend giving it a try tbh.

iron fractal
#

That's what I've been doing though, and why I was lead to my original question.

hallow plinth
iron fractal
#

yes, I pass fonts to Elements in the options, like in the code snippet I shared just a message back. Then in the style for CardElement, I set fontFamily to Source Sans 3. But that font strangely is the only one not working from the fontsgoogleapi

hallow plinth
#

Ah I see. my bad. I thought you were setting passing it on the wrong object. Never mind!
Give me a few..