Jump to content

Edit History

Chill_user

Chill_user

Hello to all, I tried to install custom fonts to the prestashop, following this article. Link

My version of prestashop is 1.7.5.

According to this article, I am placing code I made below, maybe there is some problem with .css files or something.

P.S. Yes, I cleared cache and deleted shop.json file in config/theme/{theme_name}/shop.json

My code , fonts.css:

@font-face {
    font-family: 'Walkway';
    src: url('../fonts/walkway/Walkway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
},
@font-face {
	font-family: 'Acumin-Pro';
	src: url('../fonts/acumin-pro/Acumin-RPro.otf') format('otf');
	font-style: normal;
	font-weight: normal;
}

theme.yml code: 

assets:
  css:
    all:
      - id: fonts
        path: assets/css/fonts.css
        priority: 30

And in .tpl file:

<p style="font-family: Walkway !important; font-size: 35px">
  A B C D E F G test with lalalal
</p>

And all files of the fonts are placed with correct path : {theme}/assets/fonts/{font_name_folder}/font.ttf

 

Thanks for your help!

Chill_user

Chill_user

Hello to all, I tried to install custom fonts to the prestashop, following this article. Link

My version of prestashop is 1.7.5.

According to this article, I am placing code I made below, maybe there is some problem with .css files or something.

P.S. Yes, I cleared cache and deleted shop.json file in config/theme/{theme_name}/shop.json

My code , fonts.css:

@font-face {
    font-family: 'Walkway';
    src: url('../fonts/walkway/Walkway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
},
@font-face {
	font-family: 'Acumin-Pro';
	src: url('../fonts/acumin-pro/Acumin-RPro.otf') format('otf');
	font-style: normal;
	font-weight: normal;
}

theme.yml code: 

assets:
  css:
    all:
      - id: fonts
        path: assets/css/fonts.css
        priority: 30

And in .tpl file:

<p style="font-family: 'Walkway' !important; font-size: 35px">
  A B C D E F G test with lalalal
</p>

And all files of the fonts are placed with correct path : {theme}/assets/fonts/{font_name_folder}/font.ttf

 

Thanks for your help!

Chill_user

Chill_user

Hello to all, I tried to install custom fonts to the prestashop, following this article. Link

My version of prestashop is 1.7.5.

According to this article, I am placing code I made below, maybe there is some problem with .css files or something.

P.S. Yes, I cleared cache and deleted shop.json file in config/theme/{theme_name}/shop.json

My code , fonts.css:

@font-face {
    font-family: 'Walkway';
    src: url('../fonts/walkway/Walkway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
},
@font-face {
	font-family: 'Acumin-Pro';
	src: url('../fonts/acumin-pro/Acumin-RPro.otf') format('otf');
	font-style: normal;
	font-weight: normal;
}

theme.yml code: 

assets:
  css:
    all:
      - id: fonts
        path: assets/css/fonts.css
        priority: 30

And in .tpl file:

<p style="font-family: HelveticaNeueLight !important; font-size: 35px">
  A B C D E F G test with lalalal
</p>

And all files of the fonts are placed with correct path : {theme}/assets/fonts/{font_name_folder}/font.ttf

 

Thanks for your help!

Chill_user

Chill_user

Hello to all, I tried to install custom fonts to the prestashop, following this article. Link

My version of prestashop is 1.7.5.

According to this article, I am placing code I made below, maybe there is some problem with .css files or something.

P.S. Yes, I cleared cache and deleted shop.json file in config/theme/{theme_name}/shop.json

My code , fonts.css:

@font-face {
    font-family: 'Walkway';
    src: url('../fonts/walkway/Walkway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
},
@font-face {
	font-family: 'Acumin-Pro';
	src: url('../fonts/acumin-pro/Acumin-RPro.otf') format('otf');
	font-style: normal;
	font-weight: normal;
}

theme.yml code: 

assets:
  css:
    all:
      - id: fonts
        path: assets/css/fonts.css
        priority: 30

And all files of the fonts are placed with correct path : {theme}/assets/fonts/{font_name_folder}/font.ttf

 

Thanks for your help!

Chill_user

Chill_user

Hello to all, I tried to install custom fonts to the prestashop, following this article. Link

My version of prestashop is 1.7.5.

According to this article, I am placing code I made below, maybe there is some problem with .css files or something.

P.S. Yes, I cleared cache and deleted shop.json file in config/theme/{theme_name}/shop.json

My code , fonts.css:

@font-face {
    font-family: 'Walkway';
    src: url('../fonts/walkway/Walkway-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
},
@font-face {
	font-family: 'Acumin-Pro';
	src: url('../fonts/acumin-pro/Acumin-RPro.otf') format('otf');
	font-style: normal;
	font-weight: normal;
},
@font-face {
	font-family: 'Muli-Bold';
	src: url('../fonts/Muli_Type/Muli-Bold.ttf') format('truetype');
	font-style: normal;
	font-weight: normal;
},
@font-face {
	font-family: 'Muli-ExtraBold';
	src: url('../fonts/Muli_Type/Muli-ExtraBold.ttf') format('truetype');
	font-style: normal;
	font-weight: normal;
},
@font-face {
	font-family: 'Muli-SemiBold';
	src: url('../fonts/Muli_Type/Muli-SemiBold.ttf') format('truetype');
	font-style: normal;
	font-weight: normal;
},
@font-face {
    font-family: 'MyriadPro-Light';
    src: url('../fonts/Myriad/MyriadPro-Light.otf');
    font-weight: normal;
    font-style: normal;
},
@font-face {
    font-family: 'HelveticaNeueLight';
    src: url(HelveticaNeueLight.ttf);
    font-weight: normal;
    font-style: normal;
};	

theme.yml code: 

assets:
  css:
    all:
      - id: fonts
        path: assets/css/fonts.css
        priority: 30

And all files of the fonts are placed with correct path : {theme}/assets/fonts/{font_name_folder}/font.ttf

 

Thanks for your help!

×
×
  • Create New...