Zen Cart Logo
Forums / General Questions / Custom fonts using a TTF file

Custom fonts using a TTF file

Locked

Views: 2,705

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
21 Jan 2009, 9:36 PM
#1
stepterr avatar

stepterr

New Zenner

Join Date:
Sep 2008
Posts:
13
Plugin Contributions:
0

Custom fonts using a TTF file

Has anyone been able to use custom fonts on their Zen-Cart site? I have code that will create a *.PNG file based on the text and this works on a page that I did as a test outside of Zen-Cart but for some reason I can't get it working within Zen-Cart. Does anyone do anything similar and have you been able to get it working?

21 Jan 2009, 10:22 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Custom fonts using a TTF file

Bear in mind that if you choose to use exotic fonts, they will only render in a visitor's browser if that visitor has the font(s) installed.

So while your site may look 100% on YOUR computer, it may look like a dog's breakfast on someone else's machine.

At the end of the day, customers are at your site to buy products and get information about the products. While style is important to your corporate ID and branding, it's worth considering that the easier it is to read the information, the more likely you are to keep the customer satisfied - and make sales (which is the whole point, isn't it?).

21 Jan 2009, 11:23 PM
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Custom fonts using a TTF file

what about serving the fonts server side

21 Jan 2009, 11:47 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Custom fonts using a TTF file

Merlinpa1969:

what about serving the fonts server side

... a possibility... but there may be copyright issues at stake here. Unless the font is "freeware", serving it up to the public in the manner of a CSS call is infringement of copyright. Loading the .ttf onto your website and offering it for download will most often be a copyright infringement in itself.

A possible solution for using alternative fonts is one of the various sIFR methods, which entails dynamically switching standard text with Flash containing the required characters.

Forum member Robine seems to have had success here:

http://www.zen-cart.com/forum/showthread.php?t=118141

21 Jan 2009, 11:49 PM
#5
kobra avatar

kobra

Black Belt

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

Re: Custom fonts using a TTF file

I have code that will create a *.PNG file based on the text
As this is an image and the preferred way to insure that an item looks as you want on all customer's browser's, what is it that is not working if you are providing the image?

22 Jan 2009, 12:30 AM
#6
vinyl_signs avatar

vinyl_signs

Zen Follower

Join Date:
Jun 2007
Location:
Shropshire UK
Posts:
125
Plugin Contributions:
0

Re: Custom fonts using a TTF file

stepterr:

Has anyone been able to use custom fonts on their Zen-Cart site? I have code that will create a *.PNG file based on the text and this works on a page that I did as a test outside of Zen-Cart but for some reason I can't get it working within Zen-Cart. Does anyone do anything similar and have you been able to get it working?I purchased a script some time ago that will produce an image from a TTF file - I have modified it a great deal - not finished yet - and I intend only using freeware fonts when I eventually start using it - "Genuinly" freeware fonts are however far harder to find than most of the "Free font" sites would have you believe - here's the test - if it doesn't work - it's 'cause the site is (or should be) down for maintenance...whether you could purchase the script yourself and modify it depends on what you are aiming to do ? - but it will produce an image from a TTF...
http://maplesigns.co.uk/store/banner

22 Jan 2009, 3:05 AM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Custom fonts using a TTF file

Look into sifr, it works for human and search engines. It is an ideal solution if you want to use special font on your site.

22 Jan 2009, 5:22 AM
#8
kobra avatar

kobra

Black Belt

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

Re: Custom fonts using a TTF file

Did everyone miss that the OP was creating these as a .png??

22 Jan 2009, 9:36 AM
#9
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Custom fonts using a TTF file

Kobra's correct in bringing our focus back to the OP's original point.

As we don't know what script is involved however, it's difficult to suggest ways of getting it to work in ZC.

But sIFR does the same thing and is considered a better method by some.

My earlier thread showed the following post:

http://www.zen-cart.com/forum/showthread.php?t=118141

Now while this deals with sIFR, it shows how Robine managed to embed the code. Perhaps stepterr could see if the principles Robine applied, could also apply in this case.

22 Jan 2009, 11:07 PM
#10
stepterr avatar

stepterr

New Zenner

Join Date:
Sep 2008
Posts:
13
Plugin Contributions:
0

Re: Custom fonts using a TTF file

Schoolboy, thanks for linking that other thread. After looking up sIFR I think I might give that a go instead, looks like it's more seamless than the php/javascript solution I using (attempting to use) right now so that's a bonus!