Selecting an alternate font

From: Roedy Green (
Date: 05/19/04

Date: Wed, 19 May 2004 16:36:19 GMT

In HTML you can provide a list of fonts, and it picks the best it can
from the list given what is available.

If you try this is Java, you don't get null returned from getFont, you
get a replacement without any indication it has happened. What is the
best way to choose a font from a list of possible, in order by

The methods for determining what you got seem to be muddled with
locale specificity. They also are ambiguously documented about what
sort of string you get back.

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See for The Java Glossary.

Relevant Pages

  • Re: Just getting started on the FAQ site...
    ... on sites using "content management systems". ... One of the main features of the HTML standard is that what ... If you're having general problem in IE with sites whose fonts don't resize, you might want to consider switching your browser loyalty! ... From experience in similar projects, I suspect that the site will grow and develop. ...
  • Re: ENT 2004 crashes when opening mail with embedded HTML
    ... I've had issues with fonts that required that exact remedy. ... Entourage uses a flavour of the Tasman rendering engine, ... HTML message, it might be caused by corrupted browser preferences. ... I guess I can do a full rebuild but I¹m trying to avoid it if possible. ...
  • Re: Blank Messages when typing
    ... Make sure you aren't set to "read messages in plain text only" under Tools | Options | Read and then see if you can read the body. ... regsvr32 msthmled.dll ... That will re-register some of the programs that are involved with the compose and rendering HTML window and might fix it. ... > The fonts have been keeping the setting fine. ...
  • Re: Asking if elements in struct arre zero
    ... > a monospace font? ... >> Also little bitty fonts that require a Hubble scope to see. ... HTML would wrap nicely. ... Fonts, colors, sizes etc. are none of the senders business. ...
  • Re: Book/tutorial about SEO
    ... You really ought to stick to safe fonts, but it's your site and your ... "IE is much more forgiving when it comes to CSS and HTML errors. ... but is the recommended solution any different from NOT closing the form ... Invalid code is still invalid code. ...