chargebee-js-wrappers icon indicating copy to clipboard operation
chargebee-js-wrappers copied to clipboard

Vue wrapper custom font using url src not working

Open mcelligottnick opened this issue 2 years ago • 3 comments

Following the example here, part of my component configuration looks like;

fonts: [
	{
		src: 'https://MYPUBLICURL/Poppins-Regular.woff',
		fontStyle: 'normal',
		fontFamily: 'Poppins',
		fontWeight: '400',
	},
	{
		src: 'https://MYPUBLICURL/Poppins-Bold.woff',
		fontStyle: 'normal',
		fontFamily: 'Poppins',
		fontWeight: '700',
	},
],

However when the component loads the font does not work. If I change the above to;

fonts: [
	{
		src: 'https://MYPUBLICURL/Poppins-Regular.woff',
		fontStyle: 'normal',
		fontFamily: 'Poppins',
		fontWeight: '400',
	},
	{
		src: 'https://MYPUBLICURL/Poppins-Bold.woff',
		fontStyle: 'normal',
		fontFamily: 'Poppins',
		fontWeight: '700',
	},
        'https://fonts.googleapis.com/css?family=Poppins',
],

I do see the Poppins font correctly.

If I visit https://MYPUBLICURL/Poppins-Regular.woff in an incognito browser it downloads the font as expected.

mcelligottnick avatar Jun 29 '23 16:06 mcelligottnick

Hi @mcelligottnick For security reasons, we do not support custom font URLs.

cb-dinesh avatar Aug 02 '23 06:08 cb-dinesh

@cb-dinesh alright thanks mate, you should remove it from the docs then.

mcelligottnick avatar Aug 02 '23 14:08 mcelligottnick

Hi @mcelligottnick For security reasons, we do not support custom font URLs.

Please remove this from the docs for React too, I wasted a lot of time because of this...

damyco avatar Nov 17 '23 15:11 damyco

This has been resolved.

cb-suvrodeep avatar Jan 08 '25 05:01 cb-suvrodeep