Setup.exe: Font issue

Benjamin Riefenstahl
Sat May 31 17:10:00 GMT 2003

Hi Gary,

Sorry for this long reply.  ;-)

"Gary R. Van Sickle" <> writes:
> I'm guessing that the "real" problem isn't the particular font used,
> but rather some code somewhere that isn't doing the ridiculously
> arcane "Dialog Units <-> Pixels <-> Font Size" conversions quite
> right and/or in response to the right messages.

That conversion is hardcoded in the OS.  As long as setup.exe is using
dialogs instead of self-drawn document-style windows, that's how it
works.  It's Windows' imitation of geometry management.

It does assume that all controls in a dialog use the same font.  And
that is what is broken.  The OS provides a wrapper dialog that uses
one font and the sheets try to use another font.  Doesn't work, s.a.

As I see it there are two other things that could be done in theory:

a) The font could be set correctly in some init function or init
message, before the conversions are executed.  I am not sure this is
possible at all, but if we find a place where it can be done, we could
eliminate a dependency.

b) We could do our own real geometry management, i.e. resize the
dialog and the controls so that everything fits.  I would think that
even a simple management just for the cases we care about without any
genericity is already overkill here.

> One concern too is, is changing the font going to fix things on all
> systems, or is the new font bitmapped on some as well?

This particular problem is fixed, as long as MS uses this very font
specification (MS Shell Dlg, 8) on all systems.  I'm not sure that
that is garanteed in some documentation, but I think it's highly
likely.  It's an alias anyway, so MS can always change what it points
to, if they need to do something special.  Also the parsing code that
I sent could be used to verify, if you think that is necessary.

Whether the font is bitmapped or not is not really important.  Even
bitmapped fonts can have different pt/pixel ratios on different
systems.  It is only important that all components involved use the
*same* font.

> Ben: I apologize for sort of "dropping the ball" on this.  My real
> life is at an all-time high in its time absorbancy.

No apology needed.  There are more important issues in all our lifes,
that's always understood.  Please don't feel rushed just because I
send a message on a list.

After all, we do have access to the source, so we don't really depend
on each other.  ;-)

so long, benny

More information about the Cygwin-apps mailing list