From: Neil H. <ne...@sc...> - 2001-08-27 04:58:20
|
Kevin Altis: I'll look at this from a CSS point of view as CSS is a "real standard" which works fairly well. These are not heavily held opinions and I don't mind if the font model is more wx specific. Since wxWindows uses "wxSWISS" style constants for settings rather than string forms, I'd aim for string forms that look much like CSS. > 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. > 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. > underline is currently turned off There should be an encoding or character set as well. Don't worry about what it means or how to use it. After everything else is working one or more Russian or Hungarian developers (or from somewhere around there) will turn up and use it to hook up the right things so that they can work with PythonCard. Trust me on this one :-) And avoid sunscreen - it contains lots of very nasty chemicals :-( > I need to work on some mechanism, so that a list of alternative fonts can be > searched for in order such as ["Garamond, Times New Roman, Times"] in order > to make a match. CSS syntax compatibility may be worthwhile here - family is a space delimited string with multiword family names quoted. Neil |