|
From: Kevin A. <al...@se...> - 2001-08-27 05:44:08
|
> Neil Hodgson > > 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 agree. CSS would be better, I think the question is how far we take it. > > 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. We need a list of face names to default to for each of these types for different platforms. Is there a standard CSS font list? The last time I did web pages for a living, CSS didn't exist, so I'm in the dark here :) > > 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. Ultimately, we have to map to wxPython right now, so having a richer list is fine as long as it is going to translate. I specifically mimicked the font dialog since I thought that would be more intuitive. I will make underline another style if it works on *nix and not just Windows. > 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'll add encoding, though I'm sure we'll have to change whatever I add. > > 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. Again, CSS is fine with me. It is mostly a matter of how far we take it and how complex the parsing will be. Will the CSS syntax translate over to wxSTC as well when we start setting font characteristics for individual characters in a field? ka |