Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue wrapper custom font using url src not working #138

Open
mcelligottnick opened this issue Jun 29, 2023 · 3 comments
Open

Vue wrapper custom font using url src not working #138

mcelligottnick opened this issue Jun 29, 2023 · 3 comments

Comments

@mcelligottnick
Copy link

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.

@cb-dinesh
Copy link
Contributor

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

@mcelligottnick
Copy link
Author

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

@damyco
Copy link

damyco commented Nov 17, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants