[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Progress update on alternative rendering engines project
From: |
Werner LEMBERG |
Subject: |
Re: Progress update on alternative rendering engines project |
Date: |
Sat, 05 Aug 2023 04:26:57 +0000 (UTC) |
Hello Anurag,
> 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.
With 'FreeType' you mean the standard rasterizer in `src/smooth`,
right?
> Its only with SIMD optimizations that fontdue is faster in a small
> range of sizes.
Very interesting! Raph, can you comment, please? You can find
Anurag's comparison images at
https://lists.nongnu.org/archive/html/freetype-devel/2023-08/msg00008.html
> 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.
Thanks in advance.
> 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.
What exactly did you compare time-wise with FreeType's 'smooth'
render? The original Rust version of 'fontdue', or your conversion of
'fontdue' into a FreeType driver module written in C?
https://gitlab.freedesktop.org/freetype/freetype/-/tree/gsoc-anurag-2023
Werner