iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2004, 06:55 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default Common Fonts

Windows based computers come with a standard font set. I know that most computers come with more font sets than that.

I getting tired of using Arial and Times New Roman in my site design and wondered what are the "safe" fonts to use. Dreamweaver shows that I can use:

Arial
Times
Courier
Georgia
Verdana
Geneva

I want more options! Please let me know your opinions on this.

Thanks!

Rich
__________________
Me
Reply With Quote
  #2 (permalink)  
Old 10-05-2004, 07:38 PM
WebProWorld Pro
 
Join Date: May 2004
Location: United Kingdom
Posts: 151
php~pro RepRank 0
Default

Hi Richkoi.

The 6 you list are safe bets and have been around since win 95(shudder). Whilst these are still the safest bet why not write a style switcher based upon the users O/S.

So if a visitor is using win 98 switch to a font you like that you know is included standard, elseif a user in using xp use a different one, else use Verdana.

Use if, elseif, and else or case and swithch to make selections in your code. You could use any serverside language or JavaScript to make the switch.

The reason in stylesheets you 6 more than one listed is if the first isnt present on the users drive it will attempt to use the next, and so on.
Reply With Quote
  #3 (permalink)  
Old 10-05-2004, 09:23 PM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Richkoi, are you wanting more options in your Dreamweaver?
In your font selection drop down box, at the bottom is a choice "edit fonts list".

If you click this, you can add fonts that are installed on your windows. It lists them all there.

I like using Microsoft sans serif, Lucidia, monospace, Tahoma, Comic sans serif etc.

Is this what you are looking for?

If you like php~pro's excelleny idea, I have scripts, php and javascript that will do the 'stylesheet switch' by user selection.

Or the OS detection script is easy enough to retrieve a stylesheet and save the setting with a cookie.
Reply With Quote
  #4 (permalink)  
Old 10-05-2004, 10:34 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

LOL, nice new Avatar MikMik...

yeah, I know about adding fonts to the list in Dreamweaver, I just am trying to determine what would allow 99.9% (well, 95% would probably be fine) of the internet users to see the fonts correctly.

Yeah, let me see those scripts, I am always for user preference...

Thanks,

Rich
__________________
Me
Reply With Quote
  #5 (permalink)  
Old 10-06-2004, 05:41 AM
WebProWorld Pro
 
Join Date: May 2004
Location: United Kingdom
Posts: 151
php~pro RepRank 0
Default

Geez I bow to Rich. I cant remember the last time I saw anyone mention user prefference in these forums. Everyones for the hard sell and of the attitude the visitor is having it like it or not. Whether, pop ups diallers, or flash banners the web community seems to be all out to sell hard. If they got it right for a change, quit the hard sell tactics, perhaps they're sites would be remembered for the right reasons.

Kepp it up.
Reply With Quote
  #6 (permalink)  
Old 10-06-2004, 07:52 AM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Yeah, what's up, Richkoi? You trying to give us a good name?
If you get a good reputation, you might forget to become a raving hypster.... You might generate business the old fashioned way - gasp - good service !

This is the 21st century, man!

---------------------------------

Okay, I got this from 'imposter.org' but I tried to go to his site and it is moved/gone/404 error. However, it was provided free for download in a zip, and I will try to find the original on a backup disc. For now:

1.) - save this code as 'styleswitcher.js'
Quote:
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}

function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}

function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}

function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

window.onload = function(e) {
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}

window.onunload = function(e) {
var title = getActiveStyleSheet();
createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
2.) here is the relevent code from from the head section of the page I got from imposter:
Quote:
<meta name="description" content="THE IMPOSTER ::: THE 'About theimposter.org' page :::" />
<meta name="keywords" content="THE IMPOSTER, carl durbridge, durbridge, web design, css, weblog, blog, imposter, fuzzynet, templates , examples, independent, web author" />
<meta name="AUTHOR" content="Carl Durbridge" />

<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="alternate stylesheet" type="text/css" href="css/orange.css" title="orange" />
<link rel="alternate stylesheet" type="text/css" href="css/green.css" title="green" />
<link rel="alternate stylesheet" type="text/css" href="css/slim.css" title="slim" />

<script type="text/javascript" src="styleswitcher.js"></script>
3.)Here is rest, with original comments:
Quote:
</head>


<body onload="hideall();">













<div class="conttop">
<div class="boxes">
<div id="switchbox">

<!-- This is where we link to our alternate style sheets.
('default') is the initial style sheet loaded. This is the only sheet not named in the head
All the alternate sheets need to have the bracketed names matched to
the titled names in the head of the document -->
Default
Orange
<a href="#" onclick="setActiveStyleSheet('green'); return false;" title="Big Green">Big
Green</a> Slim
</div>


</div>
</div>
What I did is put the 4 stylesheets in a folder 'css' and the sheets are switched with the links. The changes are save in a cookie so that all the documents/pages use the 'user preference' they have chosen.

I will try to get the page cleaned up back to original, and just zip everything for you. It is easier when you see it in action to work with.

I am far from able to write my own scripts, I have been learning through cut'n'paste, and working with templates. I get around with javascript, perl, and php. Slowly the commands and assigning functions is coming to me, I am like php~pro, I guess - if I may be so bold, I want to be a programmer and concentrate on java, xml (soap, web services) and delphi or a C language.

What I am saying is that lot's can be done without knowing the language, but php/MySQL would still be pretty handy in the meantime.

-----------------------

I have some php scripts that I got from tutorials, they are more involved than using the javascript switcher, and one of them is a browser detect to serve appropriate CSS for different browsers.
I will get them for you, and the links to the tutes. Codewalker, phpKitchen, and DevShed, I think.
Reply With Quote
  #7 (permalink)  
Old 10-06-2004, 10:38 AM
WebProWorld Pro
 
Join Date: May 2004
Location: United Kingdom
Posts: 151
php~pro RepRank 0
Default

Or you could swap the above for about 12 lines of friendly php. Soz Mikmik Im just not a JavaScript lover.
Reply With Quote
  #8 (permalink)  
Old 10-06-2004, 11:56 AM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Not to mention php is not 'browser settings' reliant! It always works, and doesn't clutter the browser cache :O)

Dynamic CSS with PHP

Looks like these pages have about everything I need to get going, awsome tute selection for common and popular features, and beginner php/MySQL. Even has smarty template engine and XML stuff, including news feeds:
http://codewalkers.com/tutorials.php?c=3
http://codewalkers.com/tutorials.php?c=5
Example
Quote:
This tutorial shows you how to use two open source, cross-platform tools for creating a dynamic Web site: PHP and MySQL. When we are finished, you will know how dynamic sites work and how they serve the content, and you will be ready to serve your own dynamic content from your site
Reply With Quote
  #9 (permalink)  
Old 10-07-2004, 07:46 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

Thanks for everything mikmik and php~pro... been busy learning Studio MX and will get back to this post once I have a little more time!

Rich
__________________
Me
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:08 PM.



Search Engine Optimization by vBSEO 3.3.0