Elmacik Posted December 15, 2005 Share Posted December 15, 2005 Hi folks,I am willing to use a non-existing font in the user agent. How can I make the client user agent to auto-download my font and view the page with that?Is there a way by coding? Or the agent will automatically get it if it cant find?This is what I found in w3.org : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML> <HEAD> <TITLE>Font test</TITLE> <STYLE TYPE="text/css" MEDIA="screen, print"> @font-face { font-family: "Robson Celtic"; src: url("http://site/fonts/rob-celt") } H1 { font-family: "Robson Celtic", serif } </STYLE> </HEAD> <BODY> <H1> This heading is displayed using Robson Celtic</H1> </BODY></HTML> Is this exactly what I mean? I tried bu no luck..And what does @, # mean in CSS coding? Link to comment Share on other sites More sharing options...
Jack McKalling Posted December 16, 2005 Share Posted December 16, 2005 You're near some_class {font-family: url(http://site/fonts/rob-celt)}This would mean the user doesn't download the font to his fonts directory at his computer, but to his internet cache directory. So he has the font only temporarily.I don't know how to force download it as a file via CSS, not possible I think. If you want the user to manualy download it, make a link on your page to the font Link to comment Share on other sites More sharing options...
F-Man Posted December 16, 2005 Share Posted December 16, 2005 Actually, you do it the right way Elmacik.Now all you have to do is to convert the font you want to an EOT file (with Microsoft Weft), upload it to your site and point to its URL instead of http://site/fonts/rob-celt. Though you should know that only IE supports embedding EOT fonts, and that the font-face at-rule has been removed in CSS 2.1 (doesn't mean it's unusable though).EDIT: Your Document Type Declaration has its URL mssing. Should be<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Link to comment Share on other sites More sharing options...
Elmacik Posted December 19, 2005 Author Share Posted December 19, 2005 Thanks for the answers,But I didnt myself write the above codes. The codes I gave above are completely copied from "www.w3.org"F-Man,Maybe I am doing it right way, but the document still shows up with default fonts :-\ Link to comment Share on other sites More sharing options...
F-Man Posted December 19, 2005 Share Posted December 19, 2005 Thanks for the answers,But I didnt myself write the above codes. The codes I gave above are completely copied from "www.w3.org"F-Man,Maybe I am doing it right way, but the document still shows up with default fonts :-\<{POST_SNAPBACK}> Have you converted the font to an EOT file like I said? Link to comment Share on other sites More sharing options...
Elmacik Posted December 19, 2005 Author Share Posted December 19, 2005 Umm.. Sorry because I got your previous message wrong.Because I want to make it available for the browsers. (Just like viewing with installed fonts..)Thanks though, I learnt too many Link to comment Share on other sites More sharing options...
Chocolate570 Posted December 20, 2005 Share Posted December 20, 2005 Yes, becauseThis SiteDoes it. How do they? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now