Closed rustyconover closed 3 years ago
@rustyconover, thanks for getting in touch! Can you share your @font-face
declarations and the CSS rules that reference the given font? Is it literally font-family: Font Awesome\ 5 Free
?
@papandreou Hi there, thanks for the reply!
I'm just using the scss files from FontAwesome at
https://fontawesome.com/how-to-use/on-the-web/using-with/sass
The font-family declaration is:
font-family: 'Font Awesome 5 Free';
I'm not sure what piece of code is adding the backslash escaping.
Seems like this escaped space syntax is output by cssnano because Font Awesome\ 5 Free
saves a single character compared the quoted string syntax of 'Font Awesome 5 Free'
(the <custom-ident>
syntax disallows identifiers starting with a number).
I updated font-family-papandreou
to allow this syntax: https://github.com/papandreou/font-family/commit/8b4826c45fca2b70cd84b5f6fa9bfa9827df1cae
Should be fixed in subfont 5.2.2 :hugs:
Hi @papandreou
Thanks for the patch, but bumping up the dependencies for gatsby-plugin-subfont to 5.2.2 leads to one problem. The Font Awesome font is no longer included in the bundle because the font-family is no longer detected as being used by the page.
It is quite strange for this to happen, I can't figure out why the face is no longer recognized.
Hmm, I think I'll need some more info to be able to debug that. Can you provide some kind of setup where it fails? Ideally a minimal setup without the plugin, but it's also fine if you can share the dev setup of the website where it happens?
Should finally be fixed in 5.2.4.
When using Font Awesome 5, subfont throws an exception when use as a part of gatsby-plugin-subfont.
Subfont is attempting to parse the font family
Font Awesome\ 5 Free
butfont-family-papandreou
does not successfully do that so it throws a parse error exception. Causing thegatsby build
to fail.