Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-13-2013, 12:22 AM   PM User | #1
OurJud
Regular Coder

 
Join Date: Feb 2010
Posts: 192
Thanks: 23
Thanked 0 Times in 0 Posts
OurJud is an unknown quantity at this point
Please explain external CSS

As I've said in another post recently, I'm using a tumblr theme that employs a font that I particularly like. From what I can gather, the font is 'Open Sans', Sans-Serif, but it seems that in order for the tumblr theme to display this font, it has to use the following external CSS: http://fonts.googleapis.com/css?fami...n+Sans:400,700

I have no problem with this, except that it makes my pages behave sluggishly while it grabs the info form the external CSS.

If I remove the code for this external CSS, the font defaults to something similar, but smaller and not as clear.

Why is this external CSS needed, and is there anything I can do in order to use this font without it?

The test forum where I'm using it is here: http://freepichost.tumblr.com/ (SFW)

Thanks in advance.
OurJud is offline   Reply With Quote
Old 02-13-2013, 08:44 AM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
It won't so much be the link to the css file that causes the delay, so much as retrieving the font files (linked in the css file) from the Google API and displaying them.

This approach (@font-face) allows you to display non-standard fonts on your page, even if the user does not have the font installed on their machine, by downloading the font as part of the page. This does obviously take longer than using a 'standard' font such as Arial which will be locally installed on the machine.

So that's why there's a delay. However, I'd say it's a pretty small one - barely noticeable on my broadband connection.

You're going to have to either live with the delay or change the font. The font you've chosen seems pretty close to Verdana to me, which you can use without having to call the font file.
__________________
Use the W3C HTML Validator and CSS Validator to check your code and Firebug to see what css is applied to an element
Read Steve Krug's book Don't Make Me Think - essential reading on web usability
I don't recommend much, but I do recommend Clook for UK web hosting
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
OurJud (02-13-2013)
Old 02-13-2013, 09:13 AM   PM User | #3
triptoway
New to the CF scene

 
Join Date: Feb 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
triptoway is an unknown quantity at this point
First u have to make the css code to related application and then u have to attached on the css code to that page where u want to show.
triptoway is offline   Reply With Quote
Old 02-13-2013, 10:28 AM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,699
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by OurJud View Post
Why is this external CSS needed, and is there anything I can do in order to use this font without it?
It isn’t needed, you could as well download the font and host it yourself (if you can modify the theme and have access to webspace on the same domain). Fontsquirrel has a ready-made font-face kit, or – for maximum control over performance – you can convert the base TTF file into the required formats with their font converter.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 02-13-2013, 11:22 AM   PM User | #5
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Quote:
Originally Posted by VIPStephan View Post
...you could as well download the font and host it yourself ....
I've always assumed that you can't do that on Tumblr?
__________________
Use the W3C HTML Validator and CSS Validator to check your code and Firebug to see what css is applied to an element
Read Steve Krug's book Don't Make Me Think - essential reading on web usability
I don't recommend much, but I do recommend Clook for UK web hosting
SB65 is offline   Reply With Quote
Old 02-13-2013, 02:17 PM   PM User | #6
OurJud
Regular Coder

 
Join Date: Feb 2010
Posts: 192
Thanks: 23
Thanked 0 Times in 0 Posts
OurJud is an unknown quantity at this point
Quote:
Originally Posted by SB65 View Post
I've always assumed that you can't do that on Tumblr?
No, you can't. Tumblr is nothing more than a free blogging platform.

Thanks to all who replied.

SB65, I think I'll probably switch to Verdana, because while the delay is nominal - as you say - it does niggle me. The only thing with standard fonts is finding a nice size. With standard fonts I personally find 11px too small and 12px too big. This @Font was the first I've come across that offered something in between.

Having said that, it's all guess work I suppose, as it all depends on everyone's monitor and res settings what size they display at.

Thanks again.
OurJud is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:48 PM.


Advertisement
Log in to turn off these ads.