Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So I used to design graphic accelerators for Mac video cards, I made (among other things) cool hardware to speed up font rendering. While some of the stuff I did was great the font rendering was underwhelming, especially on the high end apps we were targeting ... I dug into what they were doing ....

Pagemaker - invalidated the font cache at the drop of a hat, spent all its time rebuilding it.

But Quark express was the hard one - it spent all its time multiplying (which was slowish on 680x0s) - turns out it used Adobe Type Manager (ATM) to render text and they had solved some pixel cruft problems by adding 2 spaces to the end of every string they rendered and clipping it to the desired space .... in other word they drew a box around it ... ATM solved this problem (clipping) by laying out a line (all those multiplications) and if it didn't fit it would split the line in two and try again - because of those 2 clipped spaces this resulted in N squared/2 behaviour (24 char text would do 24->12 12-> 6 6-> 3 3-> 2 1) and as a result the code spent all its time laying out the text over and over again and comparatively none actually drawing

So don't do that



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: