[fpc-pascal] Unicode file routines proposal

Martin Schreiber fpmse at bluewin.ch
Wed Jul 2 12:05:29 CEST 2008


On Wednesday 02 July 2008 11.08:31 Mattias Gärtner wrote:
> Zitat von Martin Schreiber <fpmse at bluewin.ch>:
> > For example lib/common/kernel/msedrawtext.pas:223, procedure layouttext.
>
> Nice code.
> As far as I can see, it handles tabs, linebreaks, c_softhyphen and
> charwidth. It uses single array element per character optimizations, like
> the charwidths array.
> I think I would simply keep that and define the characterwidth for the
> follow up elements as 0.
> Then you only need to change the places where you check for the
> c_softhyphen. And because this is a constant you can even use some tricks
> here.
> I don't see how this have a big impact on the performance.
>
The code is complicated enough, don't you think? ;-)

Martin



More information about the fpc-pascal mailing list