Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jul 2015
    Location
    Sydney
    Posts
    5
    Member #
    51306

    SVG and @font-face

    Hi,

    it is just driving me mad and I can't tell what I am doing wrong:

    I am experimenting with a logo.svg to understand how to use fonts.
    I would like to implement my own font-family.
    To do so, I have downloaded a font from Google Fonts, then used fontsquirrel.com to get the svg-file (IndieFlower.svg).

    Now, this is what I have in my Logo.svg (the image file which is using the font):

    Code:
    <style type="text/css">
    <![CDATA[
      @font-face {
          font-family: "Indie";
          src: url('assets/fonts/IndieFlower.svg');
        }
      .st0{font-family:Indie;}
      .st1{font-size:21px;}
      .st3{fill:#737373;}
    ]]>
    </style>
    I have tried the following as well:
    - IndieFlower.ttf (ttf file instead of svg)
    - http://localhost://assets/fonts... (put the whole url. The assets folder is directly under my localhost indeed)
    - the svg-file has all reading permissions...
    - src: url('assets/fonts/IndieFlower.svg#indie_flowerregular'); (using font id from font file)

    ... so what am I doing wrong. The font is not displayed.
    If I write:
    font-family: Indie, Arial;
    The Arial font is displayed properly.

    Thanks for help
    Last edited by jemy09; Jul 29th, 2015 at 12:05 AM.

  2.  

  3. #2
    Junior Member
    Join Date
    May 2015
    Posts
    27
    Member #
    49999
    give otf file format some browser want different font file type so intall your pack on all file formate


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:45 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com