The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> How best to Force Unique font - Noob 101, @font-face not behaving
BalancedLineOut
post Feb 15 2012, 02:39 PM
Post #1


Newbie
*

Group: Members
Posts: 11
Joined: 15-February 12
Member No.: 16,487



I remember a few years ago building a ebsite and specifying a unique font using the M/S WEFT tool. I want to force browsers to use a specific font again, and came across "@font-face". I used the online utility font-squirrel, and even after doing that, I can't get the unique font to load in my web page. The sample they provide works fine, so it has to be something I'm doing... or not doing.

I know this sounds really nasty, but I've not worked with CSS before this past weekend, although I can immediately see it's advantages, and I've created so very nice pages with it. I seem to be missing the boat on this font thing, something that should be relatively simple.

I guess I'm confiused as to where the specific pieces of code go... in the index.html or the sytle.css file. Non of the tutorials are clear on that, and assume more knowledge on the subject than I have. I've even gone back to the basics - since the site I was trying to apply this to was kind of busy with code - and started working fresh on new files. Still can't get the font to work....unless I load it as a system font,.

Thks for the read, and putting up with another noob.

S~
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
BalancedLineOut
post Feb 15 2012, 03:36 PM
Post #2


Newbie
*

Group: Members
Posts: 11
Joined: 15-February 12
Member No.: 16,487



Well...hmmm...

Not getting any love out of this exercise.

This is as far as I get.

IN the index.htm file I put

<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="test" href="test.css" type="text/css" charset="utf-8" />
</head>



On the test.css file, it looks like this...

@font-face {
font-family: 'DistortiaRegular';
src: url('distorti-webfont.eot');
src: url('distorti-webfont.eot?#iefix') format('embedded-opentype'),
url('distorti-webfont.woff') format('woff'),
url('distorti-webfont.ttf') format('truetype'),
url('distorti-webfont.svg#DistortiaRegular') format('svg');
font-weight: normal;
font-style: normal;

}




.style2 {
font-family: distorti-webfont;
font-size: 18px;
font-style: normal;
font-weight: 400;
font-variant: normal;
color: #FF0000;
line-height: normal;
text-transform: none;
}


Text does not adopt the new font. Like I said, I must be missing something....and even though I don't like to have it that way, all the files for this test page are in the root of the site....until I get it working. Then I can tidy that up later.

This post has been edited by BalancedLineOut: Feb 15 2012, 03:38 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 15 2012, 03:55 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Hmm, I haven't done this since IE was the only browser that supported it, but it looks right to me. Doesn't it work in any browser? I suppose you have double checked that the font files are uploaded and the URLs to them are correct?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
BalancedLineOut
post Feb 15 2012, 04:33 PM
Post #4


Newbie
*

Group: Members
Posts: 11
Joined: 15-February 12
Member No.: 16,487



QUOTE(pandy @ Feb 15 2012, 03:55 PM) *

Hmm, I haven't done this since IE was the only browser that supported it, but it looks right to me. Doesn't it work in any browser? I suppose you have double checked that the font files are uploaded and the URLs to them are correct?


It doesn't even work in Dreamweaver. If I open the backup site, and start my font manager and enable the font in question, it works fine in all it's glory. I can't count on everyone visiting my site having this font loaded, so I have to force this. My friend, who also dabbles in web stuff came over a few minuntes ago and he has a differnet version of Dreamweaver, which displays my pages a bit differently. I might have to upgrade from my older (pre-Adobe) version ...

And to answer your question whether the path to the files is correct, this page is still only local on my machine, and all files are in the root of the site, all the variations of the font that font -squirrel kicked out, css, everything.

Still plodding along...

S~

This post has been edited by BalancedLineOut: Feb 15 2012, 04:49 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
BalancedLineOut   How best to Force Unique font - Noob 101   Feb 15 2012, 02:39 PM
pandy   I guess I'm confiused as to where the specifi...   Feb 15 2012, 02:48 PM
BalancedLineOut   Haha... I had just bookmarked that site, and ha...   Feb 15 2012, 03:23 PM
BalancedLineOut   Well...hmmm... Not getting any love out of this e...   Feb 15 2012, 03:36 PM
pandy   Hmm, I haven't done this since IE was the only...   Feb 15 2012, 03:55 PM
BalancedLineOut   Hmm, I haven't done this since IE was the onl...   Feb 15 2012, 04:33 PM
pandy   <link rel="test" href="test.css...   Feb 15 2012, 04:36 PM
BalancedLineOut   There seems to be a 3rd step to the instructions t...   Feb 15 2012, 04:50 PM
pandy   Did you read Christian's post above? He spotte...   Feb 15 2012, 05:08 PM
pandy   Wait, I think there is one more mistake. You call ...   Feb 15 2012, 05:12 PM
BalancedLineOut   Wait, I think there is one more mistake. You call...   Feb 15 2012, 08:14 PM
BalancedLineOut   Well, I don't give up, but if I was ever drive...   Feb 15 2012, 09:06 PM
BalancedLineOut   Well. Isn't that just ducky. It works. Sor...   Feb 15 2012, 09:50 PM
Christian J   <link rel="test" href="test.css...   Feb 15 2012, 04:32 PM
BalancedLineOut   Oh yeah, I also get a message when I validate the ...   Feb 15 2012, 03:49 PM
Frederiek   You get the @font-face syntax from Font Squirrel i...   Feb 16 2012, 02:53 AM
pandy   All's well that ends well. Never even occurred...   Feb 16 2012, 05:26 AM
BalancedLineOut   @Frederiek Well in the end I had to use the source...   Feb 16 2012, 06:36 AM
pandy   It is. But CSS is a *beep*. ^_^   Feb 16 2012, 06:58 AM
pandy   Sigh. I wasn't THAT bad a word. Female dog. :...   Feb 16 2012, 07:04 AM
BalancedLineOut   Sigh. I wasn't THAT bad a word. Female dog. ...   Feb 20 2012, 07:30 AM
pandy   Actually, leaving DW and typing by hand might be t...   Feb 20 2012, 08:09 AM
Frederiek   I didn't have DW code the font, I directly had...   Feb 16 2012, 09:05 AM
Darin McGrew   Not at all unusual. I take notes in classes/lectur...   Feb 20 2012, 01:56 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 02:15 PM