From: Kevin A. <al...@se...> - 2001-08-29 18:19:59
|
> > I chose to combine and hide some of the wxPython font settings. > A Font is > > described by its optional attributes: > > family: 'serif', 'sansSerif', 'monospace', 'default' > > faceName: an actual font name from the system (Arial, Courier New...) > > CSS combines these as font-family with the particular names 'serif', > 'sans-serif', 'cursive', 'fantasy', and 'monospace' being mapped > by the user > agent to available real fonts. wxWindows/wxPython wxDEFAULT Chooses a default font. wxDECORATIVE A decorative font. wxROMAN A formal, serif font. wxSCRIPT A handwriting font. wxSWISS A sans-serif font. wxMODERN A fixed pitch font. 'cursive' should map to wxSCRIPT and 'fantasy' should map to wxDECORATIVE but neither of these families seems to work for me. I don't know if I'm doing something wrong or if its a bug in wxPython or those families just aren't supported right now?! > > size: a number representing point size (8, 9, 10, etc.) > > style: 'regular', 'bold', 'italic', 'boldItalic' > > Combining these makes no sense to me. I know the Microsoft font dialog > does this but why have bold and italic combined and underline > separate? (the > reason the dialog does it is that the normal, bold, italics, and > bolditalics > are separate fonts often in separate files and you'll occasionally see > demibold and oblique in that list). A richer weight parameter is more > general and maps to CSS as does style being for italic or oblique. So we want to do a separate 'weight': 'normal', 'bold', 'lighter'? 'lighter' (wxLIGHT in wxPython) doesn't ever seem to do anything. 'oblique' (wxSLANT) appears to be the same as 'italic' (wxITALIC). CSS doesn't support underline as a style, underline is a a text decoration. "The text-decoration property allows text to be decorated through one of five properties: underline, overline, line-through, blink, or the default, none." Are you saying that you want the style to be a list of one or more values 'normal', 'italic', 'oblique', 'bold', 'underline'? It seems like it would make the most sense to have 'family' and 'style' be Python lists to simplify adding, doing slices, and checking for matches. Guess I just need to ponder this some more. Is Small Caps possible in wxPython/wxWindows? That's font-variant in CSS terms. ka |