Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2004, 12:30 PM
Authorized User
 
Join Date: Sep 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default @font-face

Could someone please provide the code to make all the text in an html show up in a particular font even if the computer it is viewed on does not have that font. I'm using a CSS, and I'm trying to use the @Font-Face class, but it doesn't seem to be working. The font I want it in is on the server and I've inlcuded the src in the @Font-Face part. Do I need to put the 'body, td, tr' part in the @Font-Face braces?

-Hunter
__________________
-Hunter
 
Old September 24th, 2004, 01:20 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

http://www.experts-exchange.com/Web/..._20812373.html

Haven't tried it, but supposedly it works :-)

HTH,

-Snib <><
http://www.snibworks.com
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)
 
Old September 25th, 2004, 09:28 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Embedded fonts are part of the standard, however, there is no standard for embedded fonts!

Seem like a paradox? It is.

The @font-face at rule currently only works with a Microsoft proprietary .eot embedded font format. You can obtain the software necessary to convert fonts installed on your OS to web-embeddable fonts from here:
http://www.microsoft.com/typography/...ame=%20&fsize=

Another solution exists, which works in Gecko and MSIE, AKAIK, and this is the pfr format. This requires their plugin to be installed and does not use the @font-face at rule provided by CSS.
http://www.truedoc.com/webpages/intro/index.html

The problem with embedded fonts is there is no standard embedded font file format!

So, if you're using the MS solution and have followed the instructions for referencing the .eot file, all you have to do is reference that font by its normal name in the font-family property. You'll only see the embedded font on the webpage in question if that font isn't already installed on the computer.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old September 29th, 2004, 04:53 AM
Authorized User
 
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It should be font-family not font-face.

 
Old September 29th, 2004, 06:31 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Quote:
quote:Originally posted by Randhy
 It should be font-family not font-face.
Why? He's talking about the at rule.
http://www.w3.org/TR/CSS2/fonts.html#font-descriptions

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old November 9th, 2004, 03:57 PM
Authorized User
 
Join Date: Nov 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here's ur css code
<style type="text/css">
body {font-family: arial; font-size: 10pt; font-weight: bold}
</style>

u can still change the font family and the font weight.
It must wrk, try it.

 
Old November 9th, 2004, 04:05 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Quote:
quote:Originally posted by scrowler
 u can still change the font family and the font weight.
It must wrk, try it.
How will that work on Linux or Mac where "Arial" is potentially not installed or is the same font as on Windows? The poster's question is how to embed fonts in a webpage not how to specify them.

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail





Similar Threads
Thread Thread Starter Forum Replies Last Post
Face Recognition using VC++ akshat_malviya Visual C++ 2 December 21st, 2009 02:50 PM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
<font face="verdana" size=2> exact equivalent -CSS crmpicco CSS Cascading Style Sheets 6 November 26th, 2005 04:41 PM
Place an image on the scrollbar face mat41 CSS Cascading Style Sheets 2 November 10th, 2005 07:41 PM
font face crmpicco HTML Code Clinic 1 February 18th, 2005 07:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.