Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    help question Why don't webfonts work with my store?

    1.3.9x
    I use webfonts all the time on my handcoded sites but for some reason they don't work when I try to apply them to zencart.

    The @font-face kits at Font Squirrel are normally easy to use if you read the instructions but with zen cart don't work for me.

    Any input on this would be great.

    c.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Why don't webfonts work with my store?

    More explanation about what you are attempting & where

  3. #3
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    Default Re: Why don't webfonts work with my store?

    Quote Originally Posted by kobra View Post
    More explanation about what you are attempting & where
    You download a webkit of the font you want to use from Font Squirrel. You put the css code into the css file and the font files in the root directory.

    In this case I believe it should be the directory where the store is

    http://www.tishstreasures.biz/store

    I tried both the store main directory and the actual root directory of the domain

    Then you put class or the actual inline code for the font

    For example this site uses web fonts. It is not a zen cart site but should work the same. http://www.pa-palam.org

    It is the header in red Pennsylvania Chapter of Palatines to America and on the next line (Pa-Palam)

    <h2 class="fontface">Pennsylvania Chapter of Palatines to America<br /><span style="margin-left: 221px;">(Pa-Palam)</h2>

    then the css for fontface is

    @font-face {
    font-family: 'KingthingsFoundationRegular';
    src: url('Kingthings_Foundation-webfont.eot');
    src: local('☺'), url('Kingthings_Foundation-webfont.woff') format('woff'), url('Kingthings_Foundation-webfont.ttf') format('truetype'), url('Kingthings_Foundation-webfont.svg#webfont632lyurb') format('svg');
    font-weight: normal;
    font-style: normal;
    }
    h2.fontface {font: 30px/38px 'KingthingsFoundationRegular', Arial, sans-serif; letter-spacing: 0; color: #e65D4f;}
    #coll2 {width="239px;
    padding-right: 9px;
    border: solid 1px #000;
    }

    The fonts are in the root directory.

    So for the tishstreasures.biz site I put
    define('HEADER_SALES_TEXT', '<h1 class="fontface">Sales Message Goes Here</h1>'); in the languages/english/classic/header.php file

    this in the css file
    @font-face {
    font-family: 'KingthingsPetrockRegular';
    src: url('Kingthings_Petrock-webfont.eot');
    src: local('☺'), url('Kingthings_Petrock-webfont.woff') format('woff'), url('Kingthings_Petrock-webfont.ttf') format('truetype'), url('Kingthings_Petrock-webfont.svg#webfontb1OIS9BX') format('svg');
    font-weight: normal;
    font-style: normal;
    }
    h1.fontface {font: 24px/28px 'KingthingsPetrockRegular', Arial, sans-serif;letter-spacing: 0;}

    The fonts were put in the store folder and also in the root of the domain name and are NOT showing up.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Why don't webfonts work with my store?

    I've never used this before, but the examples I've found seem to suggest you want to use font-family in the h2 rule.

    Here's one:

    @font-face { font-family: Delicious; src: url('Delicious-Roman.otf'); } @font-face { font-family: Delicious; font-weight: bold; src: url('Delicious-Bold.otf'); }

    h3 { font-family: Delicious, sans-serif; }

    No idea if that's it, but it might be something to look at.

  5. #5
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    Default Re: Why don't webfonts work with my store?

    Quote Originally Posted by stevesh View Post
    I've never used this before, but the examples I've found seem to suggest you want to use font-family in the h2 rule.

    Here's one:

    @font-face { font-family: Delicious; src: url('Delicious-Roman.otf'); } @font-face { font-family: Delicious; font-weight: bold; src: url('Delicious-Bold.otf'); }

    h3 { font-family: Delicious, sans-serif; }

    No idea if that's it, but it might be something to look at.
    I had to put an absolute address to the fonts and it worked so the url('mainstoreurl/fontname')

    It works!!!! Yea!!!

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Why don't webfonts work with my store?

    Or, you could have put the files directly into the css folder, and then add the filename extensions to the /includes/.htaccess to allow the files to be accessible. Then just mention the filenames in your .css file, instead of specifying entire URLs
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2010
    Location
    Oregon
    Posts
    9
    Plugin Contributions
    0

    Default Re: Why don't webfonts work with my store?

    Hello, everyone.
    I didn't see any results from this post.

    I tried to put a full url directly to the font files like mentioned above. Dr. Byte do you mind instructing me on how to edit the /includes/.htaccess file?

    I put the fonts in my main store directory and in a folder called fonts in my css folder for my template.

    Here is a URL to the site for reference.

    http://goo.gl/HHo4J

    Thank you for your time in advance.


  8. #8
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Why don't webfonts work with my store?

    I installed the webkit for my font into my Zen-Cart site, and it does work, but although it looks good in IE, it looks just awful in FF. Does anyone know how I can fix that? This is the link to the site: www.lolasboutiquenyc.com/new.

    Thanks!

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Why don't webfonts work with my store?

    Or, you could have put the files directly into the css folder
    I put the fonts in my main store directory and in a folder called fonts in my css folder
    rammerson - do you see the problem?

  10. #10
    Join Date
    Jun 2011
    Posts
    1
    Plugin Contributions
    0

    Default Re: Why don't webfonts work with my store?

    do you mind instructing me on how to edit the /includes/.htaccess file?
    Go to .htaccess in the /includes folder and replace:

    Code:
    # but now allow just *certain* necessary files:
    <FilesMatch ".*\.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    with:

    Code:
    # but now allow just *certain* necessary files:
    <FilesMatch ".*\.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL|ttf|otf|eot|woff)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>

 

 

Similar Threads

  1. v151 Why doesn't the Search function work on my store?
    By rubyyin in forum General Questions
    Replies: 20
    Last Post: 9 Apr 2014, 10:14 PM
  2. Why don't the product links work in Internet Explorer?
    By rovinghouse in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Feb 2011, 04:43 PM
  3. Why don't my Alt tags work within my EZ-Pages?
    By hedron in forum General Questions
    Replies: 3
    Last Post: 8 Oct 2009, 01:28 PM
  4. Why do some payment options work & others don't?
    By WakaG in forum Addon Payment Modules
    Replies: 2
    Last Post: 26 Aug 2009, 03:03 AM
  5. My overrides don't work blank store screen!!!!
    By FaerieMajikk in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 26 Feb 2008, 05:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg