[haiku-development] Re: app_server 4k and more implementation

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 6 Oct 2014 09:38:48 +0200

Hi,

Am 06.10.2014 um 00:35 schrieb Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>:
> I think maybe going "dpcm" is a better idea (metric) 
> (http://en.wikipedia.org/wiki/Dots_per_centimetre)

I would like to stick to the unit „point“, which is a well established 
typographic unit. It doesn’t really matter how big a "point“ is in another 
unit, be it cm or inch. There are several big APIs which use point, Cocoa and 
Swing are two examples that I know of. And font sizes were specified in points 
for ages.

The real problem with a change to the Haiku API is how to do it in a backward 
compatible way. At first glance, you may think it is easy, but it is not. The 
problem areas are BPictures, BBitmaps and printing. When you have a BBitmap and 
use BView drawing to fill it with content, you do not know what purpose this 
bitmap is going to be used for. Is it for rendering to the screen later? Or for 
printing? Or for saving to a file? You can’t just apply some scaling based on 
the screen DPI. I’ve chatted with Jonathan a bit about this, we thought 
BBitmaps could get a resolution parameter which defaults to 72 DPI (i.e. a 1:1 
mapping of points to pixels). New applications can set it, for old ones the 
behavior does not change when the BBitmap is rendered to the screen. Maybe this 
is enough already, maybe not. The BeBook has always documented the BView 
drawing coordinates to mean pixels, so that is what applications assume. 
Changing the coordinate meaning to points surely has potential for lot of 
problems.

It is a worthwhile project, and one that really needs doing soon. I wish I 
still had the time to work on it. I hope whoever decides to take it on does it 
publicly so others have the chance to provide input.

Best regards,
-Stephan


Other related posts: