RE: Progress update on alternative rendering engines project
Anurag Thakur <[email protected]>
| Newsgroups | gmane.comp.fonts.freetype.devel |
|---|---|
| Message-ID | <PN2P287MB01417E8CA73BE7CF3AC3E9E7C20EA@PN2P287MB0141.INDP287.PROD.OUTLOOK.COM> |
Hi all, From what I understood, the main performance improvement that fontdue claims to have is that it stores the font outlines differently, i.e. it seems to perform the curve flattening at initial load and stores the outline in the form of "v_lines" and "m_lines", presumably indicating "vertical lines" and lines spanning "multiple pixels horizontally". While trying to implement and benchmark it, I realized I had made a mistake in my previous benchmarks : I did not disable hinting. Fontdue does not support hinting, while the default mode for FreeType seems to have hinting enabled, leading to a decrease in performance. This was also an issue with the benchmark program used by fontdue. I created a small benchmark program and reran the benchmarks with hinting disabled, and as expected freetype was much faster with hinting disabled. So much so that on arm64 where there is no SIMD in fontdue, FreeType is faster in every single case. Its only with SIMD optimizations that fontdue is faster in a small range of sizes. I have also discovered some sort of regression with the `smooth` rasterizer using the font "Cascadia Code". Its performance degrades rapidly when rendering that font, A preliminary check indicates something to do with "overlap_spans", I will send the `perf` results as well ASAP. While I am trying to investigate more thoroughly, the benchmarks at first glance seem to indicate that only the SIMD improvement is worth considering and the other claims of performance don't seem to work well. I also noticed some regressions with opentype fonts as compared to truetype fonts, will investigate those further and report. I am currently cleaning up my small benchmark program such that the results can be reproduced and if I have made a mistake anywhere people can check it. Will send it today. Regards Anurag -----Original Message----- From: Werner LEMBERG <[email protected]> Sent: Thursday, August 3, 2023 8:08 AM To: Anurag Thakur <[email protected]> Cc: [email protected] Subject: Re: Progress update on alternative rendering engines project > I am currently working on implementing optimizations from fontdue in > the `dense` module. Any progress code-wise? Two weeks have passed, and I only see minor adjustments to the MarkDown document conversions – and no report from you :-) Werner
fontdue_arm64_arial.png
(image/png, 31.3 KB) - not displayed
fontdue_arm64_calibri.png
(image/png, 33 KB) - not displayed
fontdue_arm64_cascadia-code.png
(image/png, 32.1 KB) - not displayed
fontdue_arm64_liberation.png
(image/png, 30.6 KB) - not displayed
fontdue_arm64_roboto.png
(image/png, 31.4 KB) - not displayed
fontdue_arm64_ubuntu.png
(image/png, 31.8 KB) - not displayed
fontdue_x64_arial.png
(image/png, 34.1 KB) - not displayed
fontdue_x64_calibri.png
(image/png, 34 KB) - not displayed
fontdue_x64_cascadia-code.png
(image/png, 33 KB) - not displayed
fontdue_x64_liberation.png
(image/png, 34.4 KB) - not displayed
fontdue_x64_roboto.png
(image/png, 33.9 KB) - not displayed
fontdue_x64_ubuntu.png
(image/png, 34.2 KB) - not displayed