From: Kevin A. <al...@se...> - 2001-08-26 17:36:53
|
After a painful day of exploring fonts in wxWindows, this is what I've learned and still have questions about. I meant to post this yesterday, but ran out of time, so don't be surprised when you see a "fonts - day three" message later today. Courier, Helvetica and Times Roman on Windows are called New Courier, Arial and Times New Roman. These fonts serve as the base monospace, sans-serif and serif typefaces used for the wxWindows/wxPython font families. Are Courier, Helvetica and Times Roman the typeface names on Linux and Solaris? The foregroundColor for most widgets *is* the text color. You can see this by changing the foregroundColor with the widgets sample (test_widgets.py). The color range you can select from in the font dialog - which isn't even available on Linux and Solaris (need to confirm) - has a very limited color palette. If we support an explicit fontColor attribute for fonts as opposed to using foregroundColor separately, then the UI for selecting colors specific to fonts might be awkward. Apparently wxWindows/wxPython only supports underline on Windows right now?! Please confirm. Strikeout is not supported at all. It also appears that the full range of Windows fonts is not supported by wxWindows. Due to a bug in how fonts are handled for widgets (controls) in wxWindows/wxPython you have to make a copy of a font and replace the existing font for a widget rather than setting a font attribute directly. There appears to be a bug when setting the weight, so that you have to change another font attribute in addition to the weight for the change to be registered with a widget. This may be a bug of my own, but I think it is wxPython. I did a PythonCard app that accesses wxPython font methods directly to experiment with the various options. This is just a test and will not become a sample, so I'm attaching it here instead. ka |