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

List:       koffice-devel
Subject:    Re: underlining etc.
From:       Tomasz Grobelny <grotk () poczta ! onet ! pl>
Date:       2003-01-17 21:58:45
[Download RAW message or body]

On pią 17. stycznia 2003 01:56, David Faure wrote:
> On Friday 17 January 2003 01:25, Tomasz Grobelny wrote:
> > On czw 16. stycznia 2003 20:12, David Faure wrote:
> > > On Thursday 16 January 2003 19:57, Tomasz Grobelny wrote:
> > > > Would 4 bytes for interger be acceptable?
> > >
> > > No, sorry. Wasting 4 bytes per char only for the very rare case of
> > > different underline widths is not worth it. Do you realize how much
> > > memory it eats? You get 33% more memory being used. In the document
> > > 1dfre10.txt found by jon-d, with 1600000 characters, you'd get a memory
> > > usage - just for the characters - of 32MB instead of 25MB !
> >
> > It would be 25% (16->20 bytes) to be precise.
>
> No, the current size of KoTextStringChar is 12, without the recent addition
> of a "double". So it goes from 12 to 16...
>
No, it is 16 (checked with sizeof() and manually).

> > BTW couldn't x be "short int" instead of "int"?
>
> Would still lead to 16 bytes due to compiler alignment, and you'd end up
> with precision problems at some zoom levels possibly. And: as I said, this
> is NOT character specific anyway.
>
Underlinewidth could also be short int so there would be no diffrence in size. 
But, right, this discussion doesn't make sense.

> > > "set of underlined characters". This means that this property must be
> > > added to kotextformat, must be part of its key, and the textformatter
> > > must set it, to the biggest width for a given set of underlined
> > > characters.
> >
Is it correct now?

Tomek


***************r-e-k-l-a-m-a**************

Chcesz oszczędzić na kosztach obsługi bankowej ?
mBIZNES - konto dla firm
http://epieniadze.onet.pl/mbiznes
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.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