The widely-used FreeType library used for rendering text onto bitmaps has landed a significant optimization for its LCD filtering code path for Microsoft ClearType-like rendering. Thanks to the improvement, the rendering can be around 40% faster.
Rather than blanket LCD filtering over the entire bitmap, the latest FreeeType code now applies the filtering only to non-zero spans using direct rendering. The commit notes that for this ClearType-like rendering it’s more than 40% faster at sizes above 32 ppem.
Alexei Podtelezhnikov commented in the commit merged to FreeType Git yesterday:
“Applying an LCD filter to spans rather than the entire image improves the performance of ClearType-like rendering by about 40% at 32 ppem and much more at larger sizes. Small rounding differences are expected.”
Quite a nice improvement and a bit surprising such an optimization wasn’t implemented previously for this widely-used open-source library.
