Zen Cart Logo

Lost Fonts

Views: 820

Results 1 to 6 of 6
3 Jun 2011, 7:15 PM
#1
bakeri666 avatar

bakeri666

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Lost Fonts

I have embedded a font into my site, that works perfectly on the main site...
I have copied the integration into the Zencart's stylesheet.css file and it does next to nothing!

I say next to nothing because it takes a short while to load the h1 and h2 headings (the ones with the embedded font) so is obviously trying - but doesn't actually render it properly.

I thought something was overwriting my font, but I can't find anywhere that is doing that.

Any help would be greatly appreciated!

the site is ruths-pretty-things.co.uk
and the css files are
Main CSS - ruths-pretty-things.co.uk/guestbook/css/style.css
Zen CSS - shop.ruths-pretty-things.co.uk/includes/templates/classic/css/stylesheet.css (i was too lazy to make my own so i just edited the bundled one)

3 Jun 2011, 10:47 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Lost Fonts

Basically you can not specify a font as it is what the user has available that is used

If you demand that your site be displayed with a particular font style for your own reasons then make it an image

Zen-Venom Get Bitten

3 Jun 2011, 11:00 PM
#3
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Lost Fonts

You could also put something like this:

@font-face{font-family:"Bradley Hand ITC";src:url(../fonts/BradhITC.TTF);}

to the top of your css file, and upload the required fonts to the folder

It works on most modern browsers modern, but sometimes is limited by some user settings

3 Jun 2011, 11:10 PM
#4
bakeri666 avatar

bakeri666

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Re: Lost Fonts

CSS allows fonts to be embedded into a page and downloaded for use by the browser... If you look at the page with a modern browser you will see that it uses the colour bars font, and it works (see ruths-pretty-things.co.uk/social.php).

For some reason however it doesn't work on some browsers within shop.ruths-pretty-things.co.uk (when it uses the zen cart css file).

I am not asking how to use a non standard font because I have already succeeded in doing that without resorting to image files, I am asking if anyone knows why zencarts causes it to fail on some browsers (specifically firefox) and if they know a way around it.

But thank you for replying and attempting to help.

3 Jun 2011, 11:13 PM
#5
bakeri666 avatar

bakeri666

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Re: Lost Fonts

Design75:

You could also put something like this:

@font-face{font-family:"Bradley Hand ITC";src:url(../fonts/BradhITC.TTF);}

> 
> to the top of your css file, and upload the required fonts to the folder
> 
> It works on most modern browsers modern, but sometimes is limited by some user settings

I have done that, and it works on the none zen carts bit, but zen carts breaks it... I looked at the local .htaccess and that doesn't seem to be blocking anything extra to the root one so I can't see why it's failing :(
4 Jun 2011, 11:08 AM
#6
bakeri666 avatar

bakeri666

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

Re: Lost Fonts

it would appear Firefox doesn't like fonts being stored at different URL's to the page using them - and because i was using the shop.ruths-pretty-things.co.uk subdomain instead of ruths-pretty-things.co.uk/shop it decided that ruths-pretty-things.co.uk/font was on an external website. :oops:

I have fixed it by moving the font folder to within the shop's directory - and changing the fonts URL for the none-shop portion of the site to ruths-pretty-things.co.uk/shop/font

job is one that is good!

Hopefully some-one else can learn from my mistakes:blush: