Re: Are there OS X problems??
- From: "Dave (from the UK)" <see-my-signature@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Jan 2007 17:05:38 +0000
slebetman@xxxxxxxxx wrote:
On Jan 24, 11:13 pm, Kevin Walzer <k...@xxxxxxxxxxxxxxx> wrote:
Dave (from the UK) wrote:
Is this likely to be a problem on his OS X box, or the code that
generates the image? I did not write this part of the code and I'm
surprised this issue has not arisen before, since many have used this on
OS X before. FWIW, here is some of the code:
One thing that does sometimes cause problems when moving between
platforms is font rendering. I used to hard-code font sizes and styles
(bold, 12 point, etc.) but things looked unpredictable when moving from
X11 to Mac/Aqua. Perhaps that might be part of the problem? (I notice
the code does hard-code some font styles.) The Mac uses "Lucida" as its
system font, and the Aqua widgets are optimized to work best with that
(as opposed to Helvetica Bold, or something similar); simply omitting
the "font" specs altogether usually results in a better-looking Mac
application.
Yes. I find that it's best to *never* touch fonts on UI widgets in
plain Tk for the reason that different platforms have different
conventions for what is "right". On Mac and Windows, Tk defaults to
what is most native looking.
First, I found that in converting one of the screenshots sent to me to PGN, I changed the look a lot - I made it better than it was!!! Here it it is as a TIFF
http://chessdb.sourceforge.net/HeaderSearch1.tiff
Perhaps the font specified is not available and nothing is substituted.
The problem I have is that I'm very reluctant to change anything on that header window, since I've no idea of any dependancies there might be, and the complexity of it means I would have a hard time (coupled with the fact I'm new to tk). There is some platform specific setting of fonts:
if {$windowsOS} {
set fontOptions(Regular) [list Arial 10 normal roman]
set fontOptions(Menu) [list {MS Sans Serif} 9 normal roman]
set fontOptions(Small) [list Arial 9 normal roman]
set fontOptions(Tiny) [list Arial 8 normal roman]
set fontOptions(Fixed) [list Courier 9 normal roman]
} else {
set fontOptions(Regular) [list helvetica 11 normal roman]
set fontOptions(Menu) [list helvetica 10 normal roman]
set fontOptions(Small) [list helvetica 10 normal roman]
set fontOptions(Tiny) [list helvetica 9 normal roman]
set fontOptions(Fixed) [list fixed 10 normal roman]
}
(That file is at:
http://chessdb.cvs.sourceforge.net/*checkout*/chessdb/chessdb/tcl/start.tcl?content-type=text%2Fplain
BTW, if anyone wants to look at it any more detail, this is in CVS, tagged as relaated 6.6.12-beta-1
http://chessdb.cvs.sourceforge.net/chessdb/chessdb/?pathrev=HEAD
but it is not a small bit of code that someone can easily test!!
> Dave, don't bold your fonts. I know you want to do by bolding some
> labels but most native apps on all platforms don't do this. If you want
> to group things use labelframes. You'll find that not specifying any
> font attributes will make your app look nicer on the Mac. Of course
> font attributes in the canvas and text widgets are generally well
> behaved cross platform.
>
> If you want absolute control of how your app looks then you should look
> at Tile.
I assume this sort of thing, to set bold in a text widget is OK.
http://chessdb.sourceforge.net/tutorial/t_intro_start.php
where I have bolded it. I modified that from the normal startup window. That is a text widget. (I want to change the colour of some bits of it, but that is a different issue, so I wont ask that under this subject, as its not Mac specific anyway).
Perhaps the font specied is not avialable and nothing is substituted.
--
Dave (from the UK)
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@xxxxxxxxxxxx
Hitting reply will work for a few months only - later set it manually.
http://chessdb.sourceforge.net/ - a Free open-source Chess Database
.
- References:
- Are there OS X problems??
- From: Dave (from the UK)
- Re: Are there OS X problems??
- From: Kevin Walzer
- Re: Are there OS X problems??
- From: slebetman@xxxxxxxxx
- Are there OS X problems??
- Prev by Date: Re: C vs Tcl efficiency
- Next by Date: Re: C vs Tcl efficiency
- Previous by thread: Re: Are there OS X problems??
- Next by thread: Re: Are there OS X problems??
- Index(es):
Relevant Pages
|