www.webdeveloper.com
Results 1 to 10 of 10

Thread: How to install a special font on server ?

  1. #1
    Join Date
    Jun 2007
    Posts
    24

    How to install a special font on server ?

    Hi guys,

    I'm using a special font that I downloaded. I put that font in the C:\Window\Fonts directory and it works fine on my computer. I need to make sure that it works on the server so that anyone accesses my pages can see this font. I'm thinking of uploading this font file to the server but I don't know how to instruct the server to use this font. Just like locally, you can dump the font you like to the C:\Window\Fonts directory and it implicitly works for you and you don't have to specify the path to the font. Is there a way to do this on the server. If you have other or better solutions, please let me know. Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,407
    Web browsers do not use fonts from the server, they use those that are available to them on the client device where they are running. There are some ways to supply the client with a font from the server: do a web search on "embedded web fonts" or something like that. However, even if the user's browser supports it (and it's not disabled by their security settings), there can still be some down sides to this: namely the increased download time the first time a user accesses your page, as well as possible copyright/licensing issues for the font in question.

    Generally your best bet is to use the more commonly available fonts for the main textual elements of your page, being sure to use an appropriate generic font-family for the final option; and then for a few special things like logos and maybe major headings, create images using the desired uncommon font (being sure to use alt attribute values for text-base browsers and search engines).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Quote Originally Posted by Charles View Post
    Which will of course only work for those of your visitors using IE and may stop the other font options for working in other browsers leaving everyone not using IE to see the text in their browser default font (usuallt Times New Roman).
    Stephen

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Won't stop other font options working in other browsers and won't cause any ill side effects for the non-MSIE folks. There are some things to fancy up your site that will cause unintended bad things for some people, this is not one of them.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  6. #6
    Join Date
    Apr 2009
    Location
    Leeds, England
    Posts
    101
    I created a site on which I wanted to use a specific font which, pretty-much nobody has installed, so I just wrote the usual code, I used a secondary (more common) font, so if my font wasn't installed, another suitable font would be used. Then I just put a link allowing the user to download it if they really felt the need. The way I actually came across this special font in the first place was by downloading it from another website

  7. #7
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Hold on there, you might be commiting a crime, distributing stolen property. Not that I'm against commiting the occasional crime but it's not wise to do it publically and with a paper trail. If you're using Windows, and if you already haven't, install the Font properties extension. Then right click on the font to check if the font's copyright permits redistribution.

    The nice thing about WEFT, to keep you out of trouble it won't let you violate a font's copyright.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  8. #8
    Join Date
    Apr 2009
    Location
    Leeds, England
    Posts
    101
    That's a good point; my font is ok; only editing is restricted, redistribution is fine, but I'm a naughty boy for not checking first

  9. #9
    Join Date
    Mar 2013
    Posts
    1

    resolved How to load a font from the server

    I don't know why this technique is not generally known, but it is easy to load fonts from the server, so they don't have to have been already installed on the visitor's system.

    The trick is to make it work cross-browser for all modern browsers.

    To handle both modern browsers (using CSS3) and IE (using WEFT), you can load fonts from the webserver using both methods as follows:

    /* Load font for IE only */
    @font-face {font-family: Font Name;font-style: normal; font-weight: normal;
    src: url(FontName.eot)}
    /* Load font for other browsers */
    @font-face {font-family: Font Name;src: url(FontName.ttf)}
    /* Specify default font and any other styles */
    #id {font-family:Font Name,sans-serif}
    ...
    <p id="id">Text to be displayed</p>
    Note that the "ttf" file for WEFT must be copied to the Windows\Fonts folder prior to running WEFT to generate the "eot" file from it.

    This has been tested and seems to work.

  10. #10
    Join Date
    Apr 2013
    Posts
    1
    That sounds good. Any thing but the same **** over again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles