Fl_Text_Editor assumes that fl_width() is cheap. This was true for fonts that 
are always rendered at integer coordinates, have 255 different characters and 
don't care much how they look.

ATSU, the OS X font manager, goes to an insane length to render text correctly 
and pleasant to read. OS X screen fonts are as close to perfect print as you 
can probably get within a reasonable time. But with everything that need to be 
taken into account (sub-pixel positioning, kerning, hundreds of thousands of 
characters per font, substitutions, aliasing, etc.) determining how wide a text 
will be printed on screen is almost as expensive as rendering the text itself.

OS X widgets know that their version of fl_width is slow and optimize for that 
by caching and minimizing re-rendering. Fl_Text_Editor simply re-renders the 
whole text... .

Matthias
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to