|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
fonts
Is there any place that I can find out what fonts are web safe, (that everyone would have on ther system)? Thanks
|
|
#2
|
|||
|
|||
|
Fancy Fonts = Freaky Fonts
I don't know if there is such a thing as a collection of "web safe fonts". Early on, I learned that specifying fonts can lead to totally weird, often unreadable, outputs on some browser/platform combinations. IMHO, the best thing from the user's point of view is not to specify fonts at all (and, if I'm not mistaken, the FONT FACE tag is already depriciated in the HTML 4 standard). This way, the browser uses the font selected by the user. If they can't read it, it's their fault.
![]() |
|
#3
|
|||
|
|||
|
Indeed, the FONT-tag is depricated. All in favour of using Style Sheets. Set the font-family to a collection of fonts, so the site will at least look a bit like you intended.
I don't think there's a lot of people that let their browser override the site's fonts (would be silly also, I guess). |
|
#4
|
|||
|
|||
|
Thanks a lot. I was hopeing there was a little fancier one I could use instead of the same old boring fonts. Guess not.
|
|
#5
|
|||
|
|||
|
You could just find a few random Windows machines and take a look in the C:\windows\fonts directory. The vast majority of web users are on some kind of Windows.
Also, when you're specifying your fonts in your stylesheet (take note as above - not using HTML font tags - always specify a generic font and if the browser doesn't have a particular font it'll just use the default font of this class. The two most common font definitons are: font-family: verdana, arial, helvetica, sans-serif and font-family: times new roman, times, serif You're unlikely to get into trouble by specifying fonts as long as you do it in the stylesheet and you include the generic font (serif, sans-serif, fantasy, cursive, monospace). Where you'll get into trouble, if at all, is with font sizes. How these appear can vary widely between different resolutions and platforms (Windows, Mac, Linux). So if you get the chance, test your site as widely as possible. Try to find some good articles on CSS and font sizes as it's a real minefield but I'm sure stacks has been written about it. If you're using a server-side language like PHP you can cheat and serve up a different stylesheet depending on which platform people are using to view your site.
__________________
Please don't visit my lame personal website, www.webhamster.co.uk. Half the time it doesn't even work! |
|
#6
|
|||
|
|||
|
why server-sided and PHP? Just do it client side with javascript:
for platform detection (and this is taking it widely): if(navigator.userAgent.indexOf('IRIX') != -1) { document.write('<link rel="stylesheet" type="text/css" href="irix.css">'); }else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('98') != -1)){ document.write('<link rel="stylesheet" type="text/css" href="win98.css">'); }else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('95') != -1)){ document.write('<link rel="stylesheet" type="text/css" href="win95.css">'); }else if(navigator.appVersion.indexOf("16") !=-1){ document.write('<link rel="stylesheet" type="text/css" href="win3_1.css">'); }else if (navigator.appVersion.indexOf("NT") !=-1){ document.write('<link rel="stylesheet" type="text/css" href="winNT.css">'); }else if(navigator.appVersion.indexOf("SunOS") !=-1){ document.write('<link rel="stylesheet" type="text/css" href="sunOS.css">'); }else if(navigator.appVersion.indexOf("Linux") !=-1){ document.write('<link rel="stylesheet" type="text/css" href="linux.css">'); }else if(navigator.userAgent.indexOf('Mac') != -1){ document.write('<link rel="stylesheet" type="text/css" href="mac.css">'); }else if(navigator.appName=="WebTV Internet Terminal"){ document.write('<link rel="stylesheet" type="text/css" href="webTV.css">'); }else if(navigator.appVersion.indexOf("HP") !=-1){ document.write('<link rel="stylesheet" type="text/css" href="hp.css">'); }else { document.write('<link rel="stylesheet" type="text/css" href="other.css">'); }; or for browser detection: if(-1 != navigator.userAgent.indexOf("MSIE")) { // Internet Explorer document.write('<link rel="stylesheet" type="text/css" href="ie.css">'); } else if (-1 != navigator.userAgent.indexOf("Mozilla")) { // Netscape document.write('<link rel="stylesheet" type="text/css" href="netscape.css">'); } else { // other document.write('<link rel="stylesheet" type="text/css" href="other.css">'); }; |
|
#7
|
|||
|
|||
|
It's simple, doing it server side allows you to reduce the document weight and the client side processing... A lot of people have still slow connection and pcs with old processors, especially at office, so, if you possible, it' always better to serve in the document the less data as possible, avoiding futile client side calculation who increments (expecially with netscape 4.xx) a lot the rendering time...
|
|
#8
|
|||
|
|||
|
slow computers (and expensive memory) are, at this simple level, storie from the 80's. Even a 386 will do this in an acceptable time (also because the user of this dinosaur-machine knows it's a lot slower). Having a server do all the work, you have to be sure the server will be able to do this at any time (even high-time), the connection should be stable and some more...
It is always up to the webmaster to deside what script to use. I merely point out it is possible to do it client-side. |
|
#9
|
|||
|
|||
|
That's cool. There's nothing inherently wrong with doing stuff on the client side if you can. Big sites that get a lot of traffic try to put as much work on the client as possible to take the strain off the server. However, as anyone who's ever tried to write truly cross-browser and cross-platform JavaScript it's immensely tricky.
For small and medium-sized sites it just isn't an issue. It's much easier to write a server-side script that you know will work for everyone because ultimately you're just serving up plain old HTML. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > fonts |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|