Oleg (and other font fanatics),
I think the problem of font sizes is nastier than you think. I would love to have you prove me wrong. See the summary and proposal at the end.

Experience with various applications/platforms/screen sizes/DPI/font faces/font sizes shows there is a lot of 'uncontrollable variation' on the physical appearance of text at various point sizes. For screens, point size is just a vague hint of pixel height.

It is possible to tweak J so that a PARTICULAR comparison looks good. For example 10pt on the same screen on Windows and Mac. But then looking at 9pt through 15pt will show there is considerable variation and things matched only at one place on the spectrum.

Comparing by eye a single line in different environments is not useful. What is critical is the height of the physical font in pixels and you can't tell this from one line. With J you can get the font height. For more general comparisons it is necessary to compare columns of 20 to 30 lines to detect differences.

The suggested use of browsers for comparisons is interesting, but less useful than one might think. Browsers are strongly oriented towards user choice of default fonts and size given in pixels (not points) and then using adjustments from that base (smaller or larger). Html can't even give point size. You have to use css. I know there used to be strong advice againts screen points and that points should only be used for printer css and assume this is still the case.

The most useful comparisons are made with the same screen at the same resolution. Screen shots between systems with different resolutions obscure and distort the problem.

Do the following comparison using the size.htm file at the end:

On my win 1280*1024 screen: notepad, wordpad, word, IE6, Jwdw, and Mozilla all have the same height for the column of 10pt text. But change to 12pt and Mozilla is quite different while the others are the still the same. Jwdp is the same as Jwdw etc at 12pt, but is a bit smaller at 10pt. You can trace the difference over differnent point sizes. Mozilla just happens to match at 10pt, but doesn't match at other sizes.

On my mac 1280*1024 screen: Safari with size.htm in various point sizes is very different from TextEdit at the same size. J column heights at the same point size fall roughly between them.

The same kind of resuls on my Linux system.

Changing the screen resolution changes these comparisons all over. They may get closer, they may get further apart, and where they match, if at all, will be at a
different point size.

Your J sizes look good to you on your Mac, but wrong on your Linux. At what point sizes? On my systems they looks equally good on my Mac and Linux system. Any tweak I did to make it look better on your Linux would make it look worse on mine. What are our Linux and Mac screen size and dpi? On my system they are:
  (0 1{".wd'qm'),4 5{".wd'qscreen' NB. Mac (72 jammed to 96)
1280 1024 96 96

  (0 1{".wd'qm'),4 5{".wd'qscreen' NB. Linux
1280 1024 100 100

Summary: I don't see how I can improve the current overall situation and think adjustments for a particular situation will just squeeze the problem around. I think we just have to accept that that physical appearance of point sizes on the screen is arbitrary and varies greatly across applications/platforms/resolutions/etc.

Proposal: Perhaps a minor addition to the J fontspec would solve the problem where what you want is a pixel size rather than an arbitrary pixel size from a point size. Depending on feedback I will consider adding a pixel style to fontspec for 601 so that it gives you a font with exactly the requested pixel height. This is trivial in Java as its fonts are actually requested in pixel size and J needs to fiddle point size to pick a pixel size. It is more complicated in windows (need to iterate fractional point sizes until you get a font that has the requested height in pixels).

*** size.htm
<style> p {font: 10pt "arial"} </style>
<p>
0<br>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
11<br>
12<br>
13<br>
14<br>
15<br>
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>
22<br>
23<br>
24<br>
25<br>
26<br>
27<br>
28<br>
29<br>
</p>
***



----- Original Message ----- From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
To: "Beta forum" <[email protected]>
Sent: Friday, September 01, 2006 6:44 PM
Subject: Re: [Jbeta] Font sizes for Linux


I will need to rerun the new beta w, but here is
quick comments on the methodlogy of approach itself.

The idea about relationship between point sizes
and physical monitor inches and in terms of DPI is
not considered relevant.

Instead, the measure of platform consistency is determined
by collecting raster screeshots from different platforms
and matching them on the same screen. Because vector graphics
(e.g. a box around a text output) will be the same pixel size,
so should be the font sizes.

To achive this, it was observed how point sizes are rendered
and the choices made in the most widely used and proven
cross-platform media: the web browsers. Besides the
authority claim, there is a practical consideration:
both the browsers and J UI need to maintain proportion
between raster images represented in pixels (web graphics)
and the font sizes, which are specified in points in
a platform-neutral way. (Also with sizes of UI controls,
typically in pixels.)

It was established that all modern web browsers on
different plaforms, for platform neutrality,
relate font point sizes to raster pixels, regardless
of native platform DPI. For example, on Mac with 72 DPI
in the TextEdit app text in Arial 12pt has the size of
Arial 9pt on Windows (96 DPI); but the same text at
Arial 12pt in Safari will be the same size as on Windows.

To better understand this, here is an experiment.
- While on Windows, Open this URL in a web browser:

http://www.jsoftware.com/jwiki/OlegKobchenko?action=AttachFile&do=get&target=font_linux.png

- Then run wordpad.exe, Type the text "Focus 0. font 10pt Arial"
  and make sure it's in font Arial 10pt.

- Now line-up the baseline of the Linux screenshot
  and the text in Wordpad

- Take full screen shot, run Paint and paste.

- Now continue the lines from the linux over the
  Wordpad area -- they give a perfect match.

http://www.jsoftware.com/jwiki/OlegKobchenko?action=AttachFile&do=get&target=font_lin-win.png

But this "Arial 10pt" is true 10pt on Mozzilla,
while in J on Linux you now need to set it to 13pt
to get the size. The idea is to set 10pt in J and
get that size.

Note 1: beta v on Mac worked correctly in accordance with
this approach.

Note 2: the font selection tool should display the
fonts in correct sizes and the same as they end
up in J forms.


--- Eric Iverson <[EMAIL PROTECTED]> wrote:

I've had yet another look at screen font sizes on all platforms. As far as I can tell the current behavior (in wbeta, probably not changed since
vbeta) is the best I can do at this time.

I've run win, win64, linux, linux64, and mac with the same screen
switched between them at 1280*1024 (LCD 19 real inches diagonal).

Here are the isigraph pixel heights for each point size on each
platform:

09 10 11 12 13 14 15 - point size
15 16 17 18 19 22 23 - win jwdw
14 15 16 18 20 21 23 - win jwdp (java 1.4)
14 15 16 18 20 21 23 - win64 jwdp (java 1.5)
14 15 17 19 21 22 23 - linux (java 1.4)
14 15 17 19 21 22 23 - linux64 (java 1.5)
12 13 14 16 17 18 20 - mac (java 1.4)

Comparisons with 45 lines on windows with notepad are exact at 12pt and
vary a little bit over the range.

At least in my test environment the linux results look OK. Comparing
with various linux text editors show quite a range in ideas of 12pt
though generally they are a bit larger than J.

The mac results are a bit small. But compared to other text apps on the
Mac they tend to be about right or even a bit large.

The screen rendered size is somewhat arbitrary and is stated to not be
exact. Everyone has there own ideas. In general Mac favors small,
Windows medium, and Linux large.

Examples and insight welcome. Note that comparisons with other than
1280*1024 on a roughly similar size screen introduce too many variables
to be usefull in doing any tweaking.

----- Original Message ----- From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
To: "Beta forum" <[email protected]>
Sent: Wednesday, August 30, 2006 2:47 AM
Subject: [Jbeta] Font sizes for Linux


>I had a look at Linux with beta v and it
> seems like it has the same font size problem
> that is now fixed for Mac.
>
> See the screenshot, which compares fonts in
> J session, a font sampler and Mozilla, etc. browsers.
> 
http://www.jsoftware.com/jwiki/OlegKobchenko?action=AttachFile&do=get&target=font_linux.png
>
> If the same phenomenon is visible on other systems
> (that J fonts at size 13 look like 10pt in a browser),
> then its the same problem as was fixed for Mac.
>
> On Windows, the fonts in Java are OK.
>
>
> --- Oleg Kobchenko <[EMAIL PROTECTED]> wrote:
>
>> j601 t beta issues
> ...
>>  * Mac fonts are smaller than Windows fonts, to be exact
>>    The ratio reflects 96/72 DPI between Windows and Mac
>>    As a result, fonts are disproportional to geometry
>>    as shown in Plot demo. Grid uses some magic so
>>    that fonts fit, but that may be non-standard ...
>
> <html><head></head>
> <body>
>    <p>Open in Mozilla (Firefox, Epiphany) and compare with J font
> sizes</p>
>    <hr />
>
>    <div style="font:10pt Arial">
>        Focus 0. font:10pt Arial
>    </div>
>
>    <div style="font:10px Arial">
>        Focus 0. font:10px Arial
>    </div>
>    <hr />
>
>    <p>15*4%3 = 20</p>
>
>    <div style="font:15pt Arial">
>        Focus 0. font:15pt Arial
>    </div>
>
>    <div style="font:20px Arial">
>        Focus 0. font:20px Arial
>    </div>
> </body>
> </html>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to