Add a font in C:/WINDOWS/Fonts

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
sandy24dec
Forum Newbie
Posts: 1
Joined: Thu Apr 09, 2009 1:10 am

Add a font in C:/WINDOWS/Fonts

Post by sandy24dec »

Hello, this is sandeep. This is my first post.

We are developing a website in php. We are using a few new fonts, and I would like to know how to add that fonts to the server.
Bruno De Barros
Forum Commoner
Posts: 82
Joined: Mon May 12, 2008 8:41 am
Location: Ireland

Re: Add a font in C:/WINDOWS/Fonts

Post by Bruno De Barros »

I think you can just do:

Code: Select all

 
copy("C:/path/to/YourFont.ttf", "C:/WINDOWS/Fonts/YourFont.ttf");
 
I'm assuming this is a Windows Server (obvious much? :lol: ), so there should be no problems with permissions.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Add a font in C:/WINDOWS/Fonts

Post by pickle »

If these fonts are for inclusion in the website, they need to be on the client machine - not the server.

If these fonts are for building graphics, forget I said anything.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
mattpointblank
Forum Contributor
Posts: 304
Joined: Tue Dec 23, 2008 6:29 am

Re: Add a font in C:/WINDOWS/Fonts

Post by mattpointblank »

If you want to use a font to display some text on the page, it might be better to use something like sIFR (Flash-based custom font rendering) which is simpler than messing with client machines if you just want some nicer-looking headings.
coalgames
Forum Newbie
Posts: 8
Joined: Sun Apr 26, 2009 12:22 am

Re: Add a font in C:/WINDOWS/Fonts

Post by coalgames »

Usually, clients do not want to download a font just to view your site (let alone someone that just got to it from a search engine).

There are many fonts to choose from and if it is not avaliable, the default browser font will be used.

It is best to just use fonts that are common such as: Times New Roman, Sans, Serif, Arial, and Verdana.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Add a font in C:/WINDOWS/Fonts

Post by jayshields »

Best option is just to embed the font in an image. Second best is use flash font rendering, as mentioned. Both methods have pros and cons.

Last option is to offer a font file download, and use that font as your font in your CSS. I highly doubt anyone would actually download and install your font just for your website though.
silenceghost
Forum Newbie
Posts: 22
Joined: Sun Oct 19, 2008 3:25 am

Re: Add a font in C:/WINDOWS/Fonts

Post by silenceghost »

Have you tried
<LINK REL="fontdef" SRC="font/font.pfr">
it just cache the font on client machine and use that cache font and your browser use it
but it has it's limitation it only use pfr and eot font
it doesnot support ttf font
but there are bunch of software that can convert ttf to eot just google it
Post Reply