is it possible to get a list of available fonts from client machine running
a browser ? 3 1994
"Mel" <me**********@h p.com> skrev i meddelandet
news:42******** @usenet01.boi.h p.com... is it possible to get a list of available fonts from client machine
running a browser ?
Not with standard Ecmascript. Why would you want to? Anyway, fonts come in
many variants and versions, not all of which can be distinguished by name.
Something called "Times" on one computer wouldn't necessarily look the same
on another. Then there might be issues like is it a
bitmap/truetype/postscript/open type font, what is the glyph set, kerning
tables and so on.
If you want to, say, make headlines in a special font you can use PHP to
render images using fonts installed on the server. The Onion seems to do
that. ( www.onion.com)
Joakim Braun
"Joakim Braun" wrote "Mel" skrev is it possible to get a list of available fonts from client machine running a browser ? Not with standard Ecmascript.
But fortunately there is a way using a dialog helper object in IE6. See the
documentation at (mind the wrap)
< http://msdn.microsoft.com/workshop/a...e/collections/
fonts.asp >
or an interactive example at
< http://4umi.com/web/font/view.htm >
Why would you want to?
Well, to optimize the chances of things looking the intended way of course.
That is a very natural and healthy desire, it would be rather strange if
(web) designers didn't care about something so fundamental as fonts, not to
say criminal. It really is a shame that this has been standardized long ago.
On top of that, why not?
hth
--
Ivo
"Ivo" <no@thank.you > wrote in message
news:42******** *************** @news.wanadoo.n l... Why would you want to? Well, to optimize the chances of things looking the intended way of course.
That is what CSS is for. Something like this:
body {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
means that the user agent should attempt to use Verdana, then Geneva,
then Arial, then Helvetica, then if none of those can be found on the
target platform, use any sans-serif font the platform can provide.
Failing that, the user agent will display your content in whatever
default font it chooses (it may do that anyway, more on that below).
That is a very natural and healthy desire, it would be rather strange if (web) designers didn't care about something so fundamental as fonts, not to say criminal. It really is a shame that this has been standardized long ago.
How do you standardize the way fonts will appear using a mechanism that
can be viewed on multiple operating systems on multiple devices? There
is simply no way to guarantee a platform is going to have your choice of
fonts (or any font aside from some uncontrollable default for that
matter).
Not only that, but the end-user is always 100% in control of their
_user_ agent (Web browser). I can override _any_ choice you make about
which font to use. I can override _any_ choice you make about what color
the font is, I can override _any_ choice you make about how big the font
should be.
On top of that, why not?
As explained, because it's impossible from both a technical (you can't
use ECMAScript running in the user agent on the client to determine what
fonts are available) and a practical (even if you could determine what
fonts are installed, you have no guarantee you can actually _use_ those
fonts) perspective.
The Web is not desktop publishing. HTML/CSS are nothing more than
_suggestions_ to user agents about how to layout and display content.
User agents are completely free to ignore any and all choices you as a
Web site designer make about how the site should appear.
--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: SeeBelow |
last post by:
I'm learning Tkinter, from Grayson's book and some online sources.
I don't know how to find out which color names and font names are
available on my system. I'm using Windows 2000. I assume that info is
in some file or files somewhere, buy I don't know the file name or
directory.
Thanks,
Mitchell Timin
|
by: Aaron Gray |
last post by:
Is there anyway to get a list of all the availiable fonts in Javascript ?
Aaron
|
by: Jonesgj |
last post by:
Hi,
How would I return a list of available fonts. I'm writing a simple word
processor, and have got the font dialog working, but wanted to create a
toolbar dropdown with a list of fonts in, instead.
I'm not a 'hardened programmer' ;-) so any simple examples out there??
Thanks in antipation
|
by: Nathan Sokalski |
last post by:
I need to get a list of the available fonts as some type of collection or
array. How can I do this? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
|
by: Tony Girgenti |
last post by:
Hello.
Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a
windows XP Pro, SP2.
Before printing a document, i want to set the font to a font that is only
available with the printer that i am printing to(Zebra TLP2844).
When i open Word and look at the fonts available for the default printer, it
does not show the fonts i want. If i cahnge the printer to the printer that
| |
by: WDS |
last post by:
Hello something weird happens to me. I have Windows Server 2003 with all the
fonts installed and Microsoft Visual Studio .NET 2003. When I create a
report on Visual Studio .NET (rpt), I can't see all the fonts available in
Windows, and I can see those fonts on Microsoft Word when I create a
document. How can I make the fonts available? I only can see 3 fonts. Does
this happen because I have a HP printer installed? I have a HP 1320...
|
by: clinisbut |
last post by:
Hi
I'm trying to write an app and don't know how to start.
I'll have a selector with a list of true type fonts.
Each font will represent a different set of chars. Example
*arial-font
*arabic-font
*russian-font
*cyrillic-font
When the user select one of them, I should list all chars available in
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |