Solved

@font-face

Posted on 1997-08-18
14
666 Views
Last Modified: 2013-12-02
I'm looking for a demonstration and explanation of how to use the @font-face CSS attribute. I found one in the Internet Client SDK but it's not very helpful. Also, I'm looking for a shareware/freeware/nagware program that will convert a TrueType font to a TrueType Open font.
0
Comment
Question by:mnichols
  • 4
  • 3
  • 3
  • +3
14 Comments
 
LVL 1

Expert Comment

by:barakp
ID: 1838060
If you want an explanation of CSS goto www.3w.org/style/

Check this site out. It's the official guidelines page.
About that font problem I'm not sure what you mean. Can you explain that.
0
 
LVL 1

Author Comment

by:mnichols
ID: 1838061
a) That web address you mentioned is invalid
b) I found the W3C's information on the topic and it's not that much more helpful.

As I said, I'm looking for a working demonstration of @font-face and a detailed explanation of the demonstration. A tutorial for using the @font-face attribute, if you will.
--
Matt Nicholson
mnichols@cs.fit.edu
0
 

Expert Comment

by:jason1
ID: 1838062
ok, the fontface attribute is used to select a font style for an html document. it is used by typing <FONT FACE="the font of your choice">...</FONT> if this doesn't quite answer your ? go to
http://quartz.gly.fsu.edu./~gordon/css_glossary.html, and a good address to find more info. on converts is:
http://www.dartmouth.edu/Pages/TidBITS/issues/TidBITS-066.html
0
 
LVL 1

Author Comment

by:mnichols
ID: 1838063
Nope, not even close. I'm talking about the new HTML 4.0 @font-face CSS attribute, which is used for font embedding. I'm looking for a demo and a detailed explanation of the code that went behind it.
--
Matt Nicholson
mnichols@cs.fit.edu
0
 

Expert Comment

by:jason1
ID: 1838064
The only software that comes to mind is Macromedia's Fontographer, which
has long been the staple for font creation and editing. I couldn't find
any specific information about whether it supports the Open Type spec,
but I'm sure it does. The only thing stopping it would be the current
state of Open Type; I'm not sure if the spec has even been finalized by
Microsoft and Adobe, although both have been talking about it for some
time.

<http://www.adobe.com/type/main.shtml>

Here's a site for more info on the True Type Open format:

<http://www.adobe.com/type/main.shtml>

>From there you can connect to Microsoft's Type pages, which are also a
good resource.

Hope this helps!

-jason


oh yeah, you also might want to try:

http://www.magnagraphics.com/fonts/   --->Kemosabe's Font Archive
0
 
LVL 1

Author Comment

by:mnichols
ID: 1838065
I'm sorry to reject you again, but that doesn't really answer my question. I'm well aware that it's possible to create a TrueType Open font, but I'm not concerned with that. What I'm concerned with is programming my web page to properly handle it. Once again, i'm looking for a web demonstration of font embedding using the @font-face attribute, as well as a detailed explanation of the code that went into the demo.-- Matt
0
 

Expert Comment

by:jason1
ID: 1838066
ok, I asked a friend who knows a lot about this stuff, and he will  E-mail me back soon with an answer(hopefully)

-jason
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:Chrrris
ID: 1838067

I am afraid that the WC3 documentation is being referred
to all over the internet. I can't suggest many specific
examples, but maybe these urls will be of use, in addition
to the example I have included:


http://www.htmlhelp.com/reference/css/quick-tutorial.html
http://tips-tricks.com/stylesheet.html
http://www.cnet.com/Content/Builder/Authoring/CSS/index.html



A simple CSS Example:
-------------------------------------

H1 {font: 15pt/17pt "Arial";font-weight: bold;color: maroon}
H2 {font: 13pt/15pt "Arial";font-weight: bold;color: blue}
H3 {font:18pt "Comic Sans MS";font-style:italic;color:magenta}
H4 {font:10pt "Comic Sans MS";font-style:italic;color:gold}
BODY {font: 10pt "Comic Sans MS";color:blue}
HR {color:red}
TABLE {border: 5;font-weight:bold;font: 10pt;color:white;background: navy;text_align:left}
LI {color:yellow}
DIV.example1 {font-size:14pt;color:green}
DIV.example2 {font-size:8pt;color:red;margin-left:1in;backcolor:green;text-align:right}
DIV.example3 {font-size:10pt;font-family:Comic Sans MS;color:red;margin-left:1in;margin-right:1in}



0
 
LVL 1

Author Comment

by:mnichols
ID: 1838068
Am I speaking in tongues? i'm talking about the @font-face style attribute (for the fifth or sixth time). not font, not font-family, not font-size. Here's a sample:

<html>
<head>
<title>Font embedding using the @font-face</title>
<style>
@font-face {font-family:comic;
                     src:url(http://axtest/tritest/beta2styles/fonts/comicbold.eot);}
</style>
</head>
<body>
<p style="font-family:comic;font-size:18pt">this line uses @font face defined in the above style element section using comic sans ms bold in 18pt.</p>
</body>
</html>

This question is 200 points for a reason. What that code sample does is automatically download the font for use in the page. Somebody PLEASE show me a working demonstration of this technology. At the very LEAST read the ENTIRE history of this question before arrogantly thinking this is an easy question-- Matt
0
 
LVL 1

Expert Comment

by:Chrrris
ID: 1838069
Well, I really tried my best to answer the question. And I did read the entire history of the question

The person who is arrogant here is you! And I am not just referring to the comment you added to my answer.

Try to show some gratitude from now on, as we are actually only  trying to help you the best we can.
0
 
LVL 4

Expert Comment

by:itamar
ID: 1838070
Hey folks, the guy is right !!!
Give a chance to this link (read the entire document before getting angry !)

I can give you the following information in advance:

"Using Cascading Style Sheets
The W3C (World Wide Web Consortium) is still discussing how dynamic fonts will work in cascading style sheets. The following information is therefore not finalized..."

http://www.bitstream.com/world/dynamic.htm#forwas

It's about Creating Web Pages with TrueDoc and Dynamic Fonts, and it's a working example itself.

If you think this is a reasonable answer, please, let me know.

I (really) hope this helps ;)
0
 
LVL 5

Accepted Solution

by:
Christian_Wenz earned 200 total points
ID: 1838071
Hi Matt,

I'll have a go.

For starters, I'll give you -yet another- W3C page, but I think that's exactly what you need:

http://www.w3c.org/TR/TD-font

Here's an experpt from this page (quite lengthy, but IMBO explaining very well):

--- start ---
         The following example defines a specific font face, Alabama Italic. A panose font
         description and source URL for retrieving a truetype server font are also
         provided. Font-weight, and font-style descriptors are provided to describe the
         font. The declaration says that the weight will also match any request in the
         range 300 to 500). The font family is Alabama and the adorned font name is
         Alabama Italic.

         <STYLE>
              @font-face {
                src: local(Alabama Italic),
                     url(http://www.fonts.org/A/alabama-italic) format(truetype);
                panose-1: 2 4 5 2 5 4 5 9 3 3;
                font-family: Alabama, serif;
                font-weight:   300, 400, 500;
                font-style:  italic, oblique;
              }
         </STYLE>

         The next example defines a family of fonts. A single URL is provided for
         retrieving the font data. This data file will contain multiple styles and weights of
         the named font. Once one of these @font-face definitions has been dereferenced,
         the data will be in the UA cache for other faces that use the same URL.

         <STYLE>
              @font-face {
                src: local(Helvetica Medium),
                     url(http://www.fonts.org/sans/Helvetica_family) format(truedoc);
                font-family: "Helvetica";
                font-style: normal
              }
              @font-face {
                src: local(Helvetica Oblique),
                     url(http://www.fonts.org/sans/Helvetica_family) format(truedoc);
                font-family: "Helvetica";
                font-style: oblique;
                slope: -18
              }
         </STYLE>

         The following example groups three physical fonts into one virtual font with
         extended coverage. In each case, the adorned font name is given in the src
         descriptor to allow locally installed versions to be preferentially used if available.

         <STYLE>
              @font-face {
              font-family: Excelsior;
              src: ;local(Excelsior Roman), url(http://site/er) format(intellifont);
              unicode-range: U+?? /* Latin-1 */
              }
              @font-face {
              font-family: Excelsior;
              src: local(Excelsior EastA Roman), url(http://site/ear) format(intellifont);
              unicode-range: U+100-220 /* Latin Extended A and B */
              }
              @font-face {
              font-family: Excelsior;
              src: local(Excelsior Cyrillic Upright), url(http://site/ecr) format(intellifont);
              unicode-range: U+4?? /* Cyrillic */
              }
         </STYLE>

         This example might be found in a UA's default style sheet. It implements the
         CSS1 generic font family, serif by mapping it to a wide variety of serif fonts that
         might exist on various platforms. No metrics are given since these vary between
         the possible alternatives.

         <STYLE>
              @font-face {
                src: local(Palatino),
                        local(Times New Roman),
                        local(New York),
                        local(Utopia),
                        url(http://somewhere/free/font);
                font-family: serif;
                font-weight: 100, 200, 300, 400, 500;
                font-style: normal;
                font-variant: normal;
                font-size: all
              }
         </STYLE>

--- end ---

If you need more detailed information, please drop me a comment.

Hope this works/helps.

   Christian
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1838072
Whoops, typo... the correct address is:

http://www.w3c.org/TR/WD-font

Sorry...
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1838073
me again x-(

I schould blast myself. Now, one and for all, the CORRECT url:

   http://www.w3.org/TR/WD-font

again sorry for the confusion!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now