Shopware 6 / Adding Local fonts to Subshop

100 views Asked by At

can anyone help please?

I need to help to set local fonts to Subshop.

Local fonts working good on main shop, but not on subshop.

I did these steps to implement local fonts to Subshop. (Same steps was used for main Shop)

  1. Fonts location:\shopware\custom\plugins\UniTheme\src\Resources\public\assets\fonts\
  2. in file - override.scss : $my-asset-path: '#{$sw-asset-theme-url}/bundles/unitheme/assets' !default;
  3. in file - base.scss add these font-face (these fonts are added to fonts location - step 1)
@font-face {
font-family: 'DIN-Regular';
src: url('#{$my-asset-path}/fonts/DIN-Regular.otf');
src: local('DIN-Regular'), local('DIN-Regular'),
url('#{$my-asset-path}/fonts/DIN-Regular.otf') format('opentype');
font-weight: 100;
font-style: normal;
}

@font-face {
font-family: 'Hind-Regular';
src: url('#{$my-asset-path}/fonts/Hind-Regular.eot');
src: local('Roboto Medium'), local('Roboto-Medium'),
url('#{$my-asset-path}/fonts/Hind-Regular.eot?#iefix') format('embedded-opentype'),
url('#{$my-asset-path}/fonts/Hind-Regular.woff2') format('woff2'),
url('#{$my-asset-path}/fonts/Hind-Regular.woff') format('woff'),
url('#{$my-asset-path}/fonts/Hind-Regular.ttf') format('truetype');
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: 'FrankRuhlLibre-Regular';
src: url('#{$my-asset-path}/fonts/FrankRuhlLibre-Regular.ttf');
src: local('FrankRuhlLibre-Regular'), local('DIN-Regular'),
url('#{$my-asset-path}/fonts/FrankRuhlLibre-Regular.ttf') format('opentype');
font-weight: 100;
font-style: normal;
}

@font-face {
font-family: SkemaProOmni;
src: url('#{$my-asset-path}/fonts/SkemaProOmni-Medium.ttf') format("truetype");
}
  1. ./console assets:install
  2. ./console theme:compile

Did i forget something?

Thank you very much for your help. Best Regards Petr.

I tried already same steps, like by other shops / but this is first subshop

0

There are 0 answers