Re: Layout

Thomas Fletcher (thomasf@qnx.com)
Wed, 13 Oct 1999 08:10:11 -0400


On Wed, 13 Oct 1999, Bruce Pearson wrote:

> I've noticed that the line breaks occur in different positions when you
> change the zoom factor. Also printing is not always the same as on the
> screen.
> What is the priority for this. Is it required to be fixed for release 1.0.
>
> I'll be willing to look at this problem.
>
> My approach would be:
>
> 1) Calculate character widths using a higher resolution font size. This
> could be fixed, say 100 point, or could be based on the printer resolution.
>
> 2) When using characters widths, they would then be scaled to the screen
> taking care to avoid truncation errors.
>
> 3) When calculating positions on the screen, all positions need to change
> from whole numbers to fixed point numbers to avoid truncation problems.
>
> 4) When creating a font for displaying text, the font height needs to be
> carefully chosen.
>
> 5) Soft spacing may need to be added to character positions when displaying
> text.

At the same time, if this type of change is being made,
I might suggest that the widths be calculated and stored
as floats rather than ints. This wouldn't really cost
much in storage space float == int32 == 4 bytes, and
wouldn't be much of a performance hit. The benefit of
course is only for the BeOS platform right now that has
some draw problems because it works in floats ... and all
those dropped/rounded decimals add up.

Thomas

-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 1.03b2.