/    Sign up×
Community /Pin to ProfileBookmark

Checking Font Existance

Is there a way to check if a person has a font installed on their system?

I ask because of a menu system I have installed on a clients web site that builds the menu and fly out menus dynamically from info in a DB. The client wants a default font that is not a standard installed font and thus is a visitor does not have the font on thier system the font defaults to Time New Roman. Well, the sub-menus overall height is effected by whether or not the desired font is used or Times New Roman. The problem comes in that the border for the submenu needs to be greater if using Times New Roman. In other words, I have to set two different size values based on which font they use.

Thus the need to determine if the font the client wants is on the system or not.

Thanks for the help.

Ian

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryAug 21.2004 — An easier solution would perhaps be to specify a series of fonts using CSS. This allows you to rank several in order, so if the user has the first (i.e. this custom font) it uses that, otherwise it uses one similar to it, and so on. You can then end with a [url=http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families]generic font family[/url].

Adam
Copy linkTweet thisAlerts:
@andersoniauthorAug 21.2004 — If I was only concerned about the actual font displaying for the sake of the font, you are correct. However, The font that they want and the one that is defaulted too vary in hieght. This variation is causing problems with the overall table size because the table size is based on a formula that is in turn based on the number of items in the overall submenu. If I know they do not have the desired font I can compinsate the formula.

If there is an easier way through javascript, jscript or CSS I am all for it but specifying a series of fonts does not solve my problem.

Thanks for taking the time to respond.

Ian
Copy linkTweet thisAlerts:
@steelersfan88Aug 21.2004 — No, there is no way to interact with the user's system this way. Adam gave you your best option.

What is the need of a formula. Using CSS would solve any issue to make your page more accessible ...
Copy linkTweet thisAlerts:
@VladdyAug 21.2004 — The root of the problem is that you are using table based, inflexible design.

Your layout should not only adjust to font face used by the visitor, but to the preferred size setting as well.

Get Firefox, load your page, hit "Ctrl"+"+" and see what happens...
Copy linkTweet thisAlerts:
@steelersfan88Aug 21.2004 — [i]Originally posted by Vladdy [/i]

[B]Get Firefox, load your page, hit "Ctrl"+"+" and see what happens... [/B][/QUOTE]
One doesn't need FireFox to see it happen. Nearly all browsers will allow this, and some minimally. One can use one's regular browser to see this design.

Although I will agree the root of the problem is the use of a table.
×

Success!

Help @andersoni spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...