Robin Dunn wrote:
>
> > can i override font faces used for standard families like wxDEFAULT
and
> > wxMODERN in my application? in Xwindows, .Xdefaults may help (haven't
> > tried it though), but what about MS windows?
>
> The last parameter of the wxFont constructor is a faceName value
sorry, the question question was ambiguous (my english needs to be
improved a lot). the idea was to substitute (at application startup)
all those fontfaces of standard families in order to eliminate the need
to set font for every particular window. so that _all_ newly created
windows use application-specific fonts instead of wxWindows defaults.
I see. No it looks like the actual faces that are used are hard coded.
Here is a snippet of the C++ code that decides this for X:
switch (family)
{
case wxDECORATIVE: xfamily = _T("lucida"); break;
case wxROMAN: xfamily = _T("times"); break;
case wxMODERN: xfamily = _T("courier"); break;
case wxSWISS: xfamily = _T("helvetica"); break;
case wxTELETYPE: xfamily = _T("lucidatypewriter"); break;
case wxSCRIPT: xfamily = _T("utopia"); break;
default: xfamily = _T("*");
}
Once all the attributes are substituted into the adobe font spec then the
"nearest matching font" is selected and used.
The good news however is that it looks like when the encoding work is done
that you will be able to set the default encoding for the app.
> There is some work going on right now in wxWindows to enable selection
of
> font encoding and also to enumerate all available fonts and encodings.
It's
> still brand new and in flux, but it looks like what you are looking for.
It
> will be in a future release of wxPython.
good news. may those results appear within two or three months?
Yes.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com
wxPython has moved Check it out!
_______________________________________________
wxPython-users maillist - wxPython-users@starship.python.net
http://starship.python.net/mailman/listinfo/wxpython-users