Don't know if this is a bug or how it should work. But the fontawesome.css in the vendor folder has no font-face for the font files loaded.
Guess because brands.scss, regular.scss and solid.scss is not compiled into it.
Is this vendor library only supposed to be compiled into your own library or be able to used as standalone?
Font awesome icons are loaded when using the CSS.
The font files are not loaded.
Joomla 5.2.1
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
In my component I'm building I want to use the vanilla fontawsome.css from the media/vendor folder. And right now it cannot be used as there is no font files loaded in it.
That is why I am questioning if it is meant to be used as standalone or should be compiled from the scss files.
After installation of Joomla the fonts (ttf, woff2) can be found in media/vendor/font-awesome-free/webfonts.
If they are not present in yours, then there might be an issue with your installation
Labels |
Added:
bug
|
Note: you can use
joomla-cms/templates/cassiopeia/joomla.asset.json
Lines 104 to 108 in e6518fb
In your template, the same as joomla cassiopeia do, which also includes some classes for core icon-
.
I think, the proper way here would be to build what you need based on the supplied scss files:
https://docs.fontawesome.com/web/use-with/scss
Note: you can use
joomla-cms/templates/cassiopeia/joomla.asset.json
Lines 104 to 108 in e6518fb
{
"name": "fontawesome",
"type": "style",
"uri": "system/joomla-fontawesome.min.css"
}
In your template, the same as joomla cassiopeia do, which also includes some classes for coreicon-
.
Yes I know, but that still don't change the main issue that the vendor/fontawesome-free is not compiled with font-faces. But if that is by design then it all good.
@Fedik as you pointed out maybe just create a fontawsome-all.scss in the folder that includes all files. This should be compiled on Joomla build, and now we have both fontawsome.css broken and fontawsome-all.css that works.
Labels |
Removed:
Information Required
|
maybe just create a fontawsome-all.scss in the folder that includes all files
Yes, kind of that. But I think it is enough to replace fontawsome.css to fontawsome-all.css, beacause fontawsome.css as it is now is useless anyway.
When working with Cassiopeia the file media/system/css/joomla-fontawesome.css is loaded.
This css file is created with build/media_source/system/scss/joomla-fontawesome.scss as base.
This file does contain @font-face
The file media/vendor/fontawesome-free/css/fontawesome(.min).css is created by compiling just a part of the file mentioned above.
It is compiled without compiling the font-face reference.
commit ffa3108 by @laoneo
Allon .. can you tell us why you have compiled the fontawesome without the font-face reference?
According to templates/cassiopeia/joomla.asset.json the file system/joomla-fontawesome.min.css is loaded
https://github.com/joomla/joomla-cms/blob/816cd8013012aa5faf21c53636a0a14f17caa64b/templates/cassiopeia/joomla.asset.json#L104C1-L108C6
The compiled file can be found in /media/system/css/joomla-fontawesome.min.css
in this file I can find a reference to the font-face... at least on my machine.
this is what I see on my machine.