On Wed, Dec 14, 2011 at 09:29:22AM +0100, Lubos Kosco wrote:
  
> Hmm, I am not sure if user had to do anything with his fonts on his 
> device/os to get good output
> ideally everything just has to work _out of box_ in the default conf

Actually, you can't. To get it half-way right, one would need to be
able to specify a font-/screen-size ratio: I.e. at device with a dimension
WxH the font size should be 12pt (wrt. DTP point == 1/6in ~= 4.2mm) ...
This is not yet possible with CSS. One would need a JS hack, to do that
calculation on load and than apply than change the style on the fly,
which may cause increased load times/page rebuilds - bad user experience.
But even if one does this, this might not satisfy the user, because than
it might be unreadable on smartphones etc.. So the user probably would
prefer to have the font size doubled and scroll a little bit more - thus
scaling without knowing the user prefs doesn't make much sense, finally.

Another alternative is to set the size to an absolute value, e.g. 12pt.
Human readable on a "common" screens, but on small devices not useful,
because than 5-10 lines may cover the whole screen - not a perfect
solution either.

The remaining alternative is to set the font-size to a relative value,
like 16px. @work on my 98dpi screen (SUN X7200A) this would result in a
font-size of ~= 4.1mm, on a SunRay 170 with a resolution of 90 dpi this
would result in a font size of ~= 4.5mm.  So it looks on devices with a
different resolution different again, and indeed, there are a lot of
devices with the same physical dimension but very different resolution:
e.g. Laptops 17" having a display with XGA 1024x768 (~75dpi),
WXGA 1280x800 (~89dpi) or WSXGA+ 1680x1050 (~116dpi) or Full HD 1920x1080
(~126dpi). So wrt. the 16px font it would result into ~5.4mm (75dpi) or
~3.2mm (126dpi) - visually a huge difference.
  
> So what is the sweet spot here?

Summary is, you can't do it right by setting a certain size. It solely
depends of the user's preferences/disabilities wrt. the device in use. 
The right thing on the developer side is to respect/obey the user's
preferences by not overwriting them with more or less senseless values
(and for browser developers to provide reasonable defaults ;-)).
  
> I can also report similar "problems" on windows 7 with ff 8.0 (didn't 
> check with other browsers yet) with stock font config

Yepp, with Windows and MacOSX history strikes you in addition. I.e.
except if one uses a 72dpi device with MacOSX or 96dpi on Windows,
everything gets scaled, i.e. for them 1mm is not 1mm anymore (and even
on MacOSX using X and setting its resolution to the value, what the
display really has, it gets scaled to something stupid ...).
  
> Can it be somehow achieved that opengrok bui would look the same on most 
> of combinations of stock oses/browsers ?

As said, probably nope. But could possibly write a JS, which records
phys. screen size and resolution (would windows always report 96 and
MacOSX 72?), but how do we get the user prefs ;-) ?

> (I know it had some problems now, css frames aren't 100% working, 
> especially the anchor back button problem in ff pisses me off, but why 
> "regress" even further? )

Because I wanna know? ;-)
  
> On 14.12.2011 2:07, bugzi...@opensolaris.org wrote:
> >http://defect.opensolaris.org/bz/show_bug.cgi?id=19105
...

Regards,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to