What's the best procedure for ensure that your custom control uses a font
that's available to the system? I'm developing a control that displays text
as part of the overall UI. I'd like to create, say, three Tahoma fonts
(12pt, 14pt and 12pt-bold). However, Tahoma may not be installed. Unlikely,
but possible.
If I enumerate the installed fonts, I could run down a list of, say, Tahoma,
Vendana, Arial, looking for a match. But, that still leaves the problem of
not being sure of finding one.
What's the best practice here? Or am I missing some crucial fact, as in
there's a suitable font that's *always* installed, so I can check for Tahoma
and, if that fails, just pick up the "guaranteed" font?
Mr. Arnold - 24 Nov 2007 03:02 GMT
> What's the best procedure for ensure that your custom control uses a font
> that's available to the system? I'm developing a control that displays
[quoted text clipped - 9 lines]
> there's a suitable font that's *always* installed, so I can check for
> Tahoma and, if that fails, just pick up the "guaranteed" font?
Wouldn't that be Microsoft Sans Serif font, which is the default font for
any control when it's placed on a form?