[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: RFC: Rationalising millimetres/points/inches
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-02-22 16:48:45
[Download RAW message or body]

Since I was just wondering about this same problem, I found this old mail
in my koffice-devel mailbox :

On Thursday 28 December 2000 17:10, Shaheed Haque wrote:
> [....]
> Agreed. And, from Thomas' note, it seems that "pt" (not "mm") is already the 
> the base unit for kword. In this light, here is my modified proposal:
> 
> 1. Store only the "pt" value, rounded to 0.01 points.
> 
> 2. On read, any point value will be rounded to 0.01 points (the equivalent 
> of 7200 dpi). The rounded value will be used to compute the "in" and "mm" 
> fields with these precautions:
> 
> - All "in" values will be rounded to 0.00001 inches (an order of magnitude 
> better than the point value).
> 
> - All "mm" values will be rounded to 0.0001 millimeters (an order of 
> magnitude better than the point value).
> 
> Since only points are used internally, no errors can accumulate (especially 
> if the GUI behaves similarly when non base units are being displayed). 
> Comments? Is the point value of 0.01 the right precision?

This idea sounds very good to me (storing only one value, deducing the others
by rounding, etc.), but the choice of the base unit seems wrong.
One day, hopefully, we'll support the DPI settings correctly (I'm waiting for some
input from Reggie and Lars on this issue). When that day comes, the conversion
between point and mm will be dependent on the display's DPI.
But when moving a KWord document from a computer to another, it's the real dimensions
that we want to be kept, right ?

Therefore I would suggest that mm is the base unit - that one is independent
from any DPI settings.

The fact that KWord uses pt internally is in fact a hack, waiting for a better
solution (in terms of DPI-dependent mm -> pt conversion).

If we agree on "mm", I volunteer to implement this in KWUnit,
and to port the loading code to it.
 
> [ BTW: Once we agree the way forwards, is there a reason why the chosen 
> scheme not be made common for all koffice apps which currently have multiple 
> units? ]

I was told that KIllustrator has around 9 different units ? :-))

However, KWord, KPresenter (and maybe KSpread ?) are probably in the
same range (in terms of units supported). Not sure about kivio and kimageshop...

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic