3

I installed a new magento 2 shop and both the front and backend were missing css etc. I ran php bin/magento setup:static-content:deploy and everything looked correct except for the logo and the icon font in the front end. I could change the logo, and the backend was showing the icons no problem. But the front end was not rendering properly:

enter image description here

enter image description here

enter image description here

What am I missing to get these icons showing?

4 Answers 4

3

I was using English UK as my language.

\pub\static\frontend\Magento\luma\en_US\fonts

had the missing fonts in it. I had to copy them to

\pub\static\frontend\Magento\luma\en_GB\fonts

I see there are a load of extra files in the en_US file, that are not in the en_GB. No idea why this is, but copying the font files into the right place and they work.

when you install on other language let say Romanian or UK English or Spanish, the program do not download all fonts in the correct folder, so for this reason we must put them manual in the language we want .. so we can have :)

2
  • Hi, the copy to other languages should be done eitherway, in my case the copy (or the symlink creation) was broken due to some virtualbox issues with windows symlink ErrMsg : Cannot create a symlink for "/.../magento/theme-frontend-luma/web/fonts/Luma-Icons.ttf" and place it to "/.../pub/static/frontend/Vendor/default/fr_FR/fonts/Luma-Icons.ttf" Warning!symlink(): Input/output error
    – medmek
    Sep 3, 2018 at 11:10
  • This seems to be a workaround, not a solution.
    – Black
    Dec 2, 2019 at 10:46
1

Run this commands in magento root:

chmod -R 0777 var; chmod -R 0777 pub/static; chmod -R 0777 pub/media; rm -Rf var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/;

This commands set the permissions and remove cache folders. In some cases it is ok to delete the cache folders from /var

Clasic commands for clear and flush cahe is:

php bin/magento cache:clean
php bin/magento cache:flush

And try again

php bin/magento setup:static-content:deploy
3
  • im using xamp on local server so permissions should not be a problem. I tried all the cache and deploys but it is not showing. All the other media content shows - there is a specific issue with the fonts. I have seen other people with the issue but no answers
    – Jon
    Nov 10, 2016 at 12:23
  • It's for web permision not pc permision, you have a Windows, click right to folder project -> properties -> uncheck Read Only and try again. If problem is on font, then is not ok declaration source path of font
    – St3phan
    Nov 10, 2016 at 15:09
  • All that does not help. And I am not sure if your need for permissions is true - devside.net/wamp-server/…
    – Jon
    Nov 13, 2016 at 14:49
0

It looks like fonts, named as "Luma-Icons.woff" and "Luma-Icons.woff2" are not getting loaded from the theme and eventually pub folder.

after setting up Symlink to Copy in di.xml

copy both fonts from vendor\magento\theme-frontend-luma\web\fonts and paste it in app\design\frontend\YourVendorName\ThemeName\web\fonts

it should work now.

-1

Have you guys try to replace

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

to

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

This seems to work for me.

1
  • Does not seem to be a good idea to mess with the core
    – Black
    Dec 2, 2019 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.