I have been working on a bunch of cross-platform patches and the different font sizes of each platform is driving me nuts. Anyone know the root of this or have any suggestions as to how to fix it? I think this must have been covered in the past, but I couldn't find anything in the archives. Its rapidly moving up my todo list since I am spending a lot of time working around it.
.hc
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have been working on a bunch of cross-platform patches and the different font sizes of each platform is driving me nuts. Anyone know the root of this or have any suggestions as to how to fix it?
The reason might be the different DPI conventions used on the various operating systems. I don't remember the exact figures, but the problem is the same if you do web design and has been discussed in this context to death. The general consensus in the design world is, to not use point-based or metric font sizes.
ciao
On Thursday, Mar 25, 2004, at 12:12 America/New_York, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have been working on a bunch of cross-platform patches and the different font sizes of each platform is driving me nuts. Anyone know the root of this or have any suggestions as to how to fix it?
The reason might be the different DPI conventions used on the various operating systems. I don't remember the exact figures, but the problem is the same if you do web design and has been discussed in this context to death. The general consensus in the design world is, to not use point-based or metric font sizes.
This sounds likely. Based on my informal survey, GNU/Linux and MacOS X are quite close in font size, with MacOS X being slightly larger, maybe due to anti-aliasing. But its not a big enough difference to cause big problems for me. But on Windows, that same font size is really small. If it is a DPI/point thing, maybe we could just fake the DPI number on Windows to get it at least closer to the GNU/Linux and MacOS X font sizes. This would also help out a lot on the help pages.
.hc
On Thu, 25 Mar 2004, Hans-Christoph Steiner wrote:
I have been working on a bunch of cross-platform patches and the different font sizes of each platform is driving me nuts. Anyone know the root of this or have any suggestions as to how to fix it?
I found yesterday that the default Tcl/Tk font isn't {Helvetica 9 bold}, it is instead {Helvetica -12 bold}, which looks exactly the same on my computer. The reason is this:
«
-size <size>
The desired size of the font. If the size argument is a positive number, it is interpreted as a size in points. If size is a negative number, its absolute value is interpreted as a size in pixels. If a font cannot be displayed at the specified size, a nearby size will be chosen. If size is unspecified or zero, a platform-dependent default size will be chosen.
» -- man 3tk font
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju
Hallo, Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
I found yesterday that the default Tcl/Tk font isn't {Helvetica 9 bold}, it is instead {Helvetica -12 bold}, which looks exactly the same on my computer. The reason is this:
«
-size <size>
The desired size of the font. If the size argument is a positive number, it is interpreted as a size in points. If size is a negative number, its absolute value is interpreted as a size in pixels. If a font cannot be displayed at the specified size, a nearby size will be chosen. If size is unspecified or zero, a platform-dependent default size will be chosen.
This is IT, Mathieu. This fully conpatible with the situation in HTML/CSS, where you shouldn't use points but, at least for designer pages, you should use pixel units.
Pixels are the same everywhere, so maybe Pd should use pixel - or does it already?
ciao
This is IT, Mathieu. This fully conpatible with the situation in HTML/CSS, where you shouldn't use points but, at least for designer pages, you should use pixel units. Pixels are the same everywhere, so maybe Pd should use pixel - or does it already?
The only problem is when you mix the two schemes (points / pixels), you get a disaster.
A 10-pixel font on my laptop is just about right.... but on my 22" desktop monitor, its microscopic (really). If you really want portability, resolution-independent is the only way to go.
I can't even begin to describe just how evil pixel-based design is. I hope that the proliferation of SVG will begin to eliminate it.
--------------------------------------------------------------- Andrew (Andy) W. Schmeder mailto:andy@a2hd.com http://www.a2hd.com
On Thu, 25 Mar 2004, Andy Schmeder wrote:
The only problem is when you mix the two schemes (points / pixels), you get a disaster.
You don't have a choice but to mix the two schemes, because Pd patches are specified in terms of pixel positions, and those pixel positions are sent to the Pd canvas, and if the font size in points auto-adjusts, the boxes may overlap, so a kind of scaling would have to be done, by a factor of the point/pixel ratio, and then at that point it doesn't make a difference whether you set the fonts in points or in pixels because you have code doing the same conversion for all other elements.
I can't even begin to describe just how evil pixel-based design is. I hope that the proliferation of SVG will begin to eliminate it.
... but the Pd GUI will remain Tcl/Tk for the foreseeable future. So, in practice, Pd should be made to use Tcl/Tk in a better way. (however this means a significant amount of rewrite...)
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju