Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jan 2003
    Location
    West Virginia
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check for font face?

    Does anyone know if there is a script that could be placed on a webpage so a person could check to see if they have a specific font face installed on their system?

    For example, let's say there is this line:

    "This page is best viewed in Tahoma Bold -- you can [check to see] if that font is installed in your fonts folder"

    If a person clicked "[check to see]" they'd get a simple alert that would either say "Font is installed" or "Font is not installed".

    Is something like that even possible??

    Thanks for any feedback....
    Reno CF

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are some "font checking" scripts available but they've got limitations which might preclude them be being able to do exactly what you want. The question that comes to mind though is how such a script would be of benefit to an end user (to be honest, I don't think most end users care what font is used as long as everything's legible).
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Location
    West Virginia
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The question that comes to mind though is how such a script would be of benefit to an end user
    I agree that it has limited use, but here's how I see using it....

    The people who frequent this forum are computer savvy so they know what fonts they're using. However much of the populace at large doesn't have a clue what is on their machine. Every now and then someone will ask me to work on their web page and will want some exotic font. I of course go through the whole routine about cross platform fonts, but they think if they can see it in Dragonswick, surely everyone else can as well.

    With the js I was wondering about, I'd put up a simple small page that they and their friends/family could access. I'd ask them to have 10 people go to that page and check to see if "Dragonswick" was on their machine -- when 10 people said "no", they'd understand that sticking with arial, verdana, helvetica, courier, etc is the only thing that makes sense.

    So it would be a tool that anyone who frequents CodingForums.com could utilize for the same purpose.

    If anyone has an idea where such a script could be found (I looked without any luck), I'd appreciate it.....
    Reno CF

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Excellent reasoning. Here's one place I can remember quickly that'll get you started: http://www.webreference.com/dhtml/column30/index.html

    Here's a discussion (with code) that's right here on this forum: Out of many, one...
    Last edited by Roy Sinclair; 02-04-2004 at 09:34 PM.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I took the code from the other thread and created the following simple page:

    Code:
    <html> 
    	<head>
    		<title>Lists all Fonts (IE 6+ Only)</title>
    	</head> 
    	<body onload="List_All_Fonts();"> 
    		<object id="dlgocx" height="0" width="0" classid=clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b>
    		</object> 
    		<script type="text/javascript">
    			var fontFound = false; 
    			function List_All_Fonts() 
    				{ 
    				var txt = '';
    				var dlghelper = document.getElementById("dlgocx"); 
    				if (typeof(dlghelper.fonts) != "undefined") 
    					{ 
    					var fontObj=dlghelper.fonts; 
    					var fontCount; 
    					if (typeof(dlghelper.fonts) != "undefined") 
    						{ 
    						fontCount=dlghelper.fonts.count; 
    						for (var i=1;i<fontCount;i++) 
    							{ 
    							txt += "<p>" + dlghelper.fonts(i) + "</p>"
    							} 
    						}
    					}
    				document.getElementById('fontcheck').innerHTML=txt;
    				return true;
    				}
    		</script> 
    		<span id="fontcheck">
    			Testing ...
    		</span> 
    	</body>
    </html>
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Roy;

    It crashed my browser (IE6.2) when I tried to run the codes.

    Just thought you would like to know.

    .....Willy

  • #7
    Regular Coder
    Join Date
    Jan 2003
    Location
    West Virginia
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Roy -- that works perfectly! I really appreciate you putting this together... hopefully it will help make it clear that "your font is not necessarily my font"!
    Reno CF

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Willy Duitt
    Hi Roy;

    It crashed my browser (IE6.2) when I tried to run the codes.

    Just thought you would like to know.

    .....Willy
    That's what you get for riding a Longhorn.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •