Jump to content

Replacing default font with custom font?


Recommended Posts

Hey everyone!

Well, I have migrated from osCommerce to PrestaShop and I just have to say... how FANTASTIC is this?! Amazing support, easy install/customising, it has it all! Thanks heaps PrestaShop!

One question however.. my website by default, uses Arial or something similar (not sure exactly but its just the default font) and I wish to upgrade the default font to a purpose made font for my website.

Can anyone PLEASE tell me how to go about replacing the default font with my own font?

I've searched the web to no avail so would appreciate someone on here showing me.


Thanks heaps in advance.


Cheers,
Matt

Link to comment
Share on other sites

First the font on web page is for browser to use, so the font you specify in your website must exists at client's computer.
If the client does not have the font you specified, it will choose a similar ones.

So even if you specified a custom font, if client doesn't install the font, then it will not be used.

By the way, you can change default font by changing "font-family" in CSS file at /themes/yoursitetheme/css/global.css
(starting from line# 15 at ver 1.3.2.3 of PrestaShop)

body {
   background-color: white;
   font-size: 11px;
   font-family: Verdana, Arial, Helvetica, Sans-Serif;
   color: #5d717e;
   text-align: center
}



*Start with the font you want, and always end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available.

Link to comment
Share on other sites

  • 3 weeks later...

hi there, ive read this post and found it rather interesting.

Im looking to change the font in my category block to a custom one but if 99% of the time, its going to simply change the font to a standard one, then there's really not much point.

Is it possible for to insert an image in the category block in which ill decide the background and add my custom font?

this way people who don't have the font installed should be able to see it as its an image?

If it works, how would i do this please?

Many thanks and kind regards,

Ryan

Link to comment
Share on other sites

If you just want to use image instead of text for the title of category block, you can do this by replacing one line in file /modules/blockcategories/blockcategories.tpl

replace this line

<h4>{l s='Categories' mod='blockcategories'}</h4>



with this line

<h4><img src="{$base_dir}/img/category.jpg" /></h4>



Please Note:
create exactly size of image category.jpg and put it under /img/ folder.

Link to comment
Share on other sites

they are all the same, it appears in top (2nd or 3rd line) theme file of the block module.
It is embraced with "h4" tag and with attribute "title", you will not miss it.

replace the line with same code I posted previously, but change the image file name. That's it.

Link to comment
Share on other sites

you can do the same way, just go there find the module and replace the title line.

the modules are

/modules/homefeaured/
/modules/blocknewproducts/
/modules/blocknewproducts/



just a quick question, were you supposed to write blocknewproducts twice?


So the codes to edit for the other titles are going to be in blockfeatured and blocknewproducts?

thanks :)
Link to comment
Share on other sites

  • 3 weeks later...
If you just want to use image instead of text for the title of category block, you can do this by replacing one line in file /modules/blockcategories/blockcategories.tpl

replace this line

<h4>{l s='Categories' mod='blockcategories'}</h4>



with this line

<h4><img src="{$base_dir}/img/category.jpg" /></h4>



Please Note:
create exactly size of image category.jpg and put it under /img/ folder.



I tried this and it changed the entire categories block background rather than the title 'category' block

thanks
Link to comment
Share on other sites

  • 2 years later...

If you just want to use image instead of text for the title of category block, you can do this by replacing one line in file /modules/blockcategories/blockcategories.tpl

 

replace this line

 

<h4>{l s='Categories' mod='blockcategories'}</h4>

with this line

<h4><img src="{$base_dir}/img/category.jpg" /></h4>

Please Note:

create exactly size of image category.jpg and put it under /img/ folder.

 

 

Can anyone update the above code for PS 1.5 ?  The h4 tags are not to be found anywhere.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...