freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [Rendering Regressions] Outlines vs. Bitmaps


From: Armin Hasitzka
Subject: Re: [ft-devel] [Rendering Regressions] Outlines vs. Bitmaps
Date: Mon, 19 Mar 2018 17:45:03 +0100
User-agent: Mailbird/2.5.1.0

Thanks for your insight! :)

I was just wondering in terms of a test framework that would detect and present rendering regressions: what should said framework compare, and what would it present? Have you had a chance to look at my GSoC draft proposal?

Judging from your text, comparing glyphs (that were rendered with different versions of FreeType) on a bitmap basis will almost certainly come up with many differences. The key is to list the glyphs according to their relative difference per pixel pair. In addition, a minimum threshold for the difference of considered pixel pairs could be useful to rule out off-by-one issues.

Further, if I understand correctly (I have to and will read up on this though), outlines do not take stem hints into account. My understanding is that hinting is only considered during rasterisation. This is part of the reason, why comparing outlines might not be the ultimate truth (compared to comparing bitmaps in combination with the metrics).

Please correct me where I am wrong and please also feel free to elaborate on what you think that a test framework (for glyph regression testing) SHOULD compare (bitmaps, outlines, metrics, ...) and what it should ultimately present.

Thanks,
Armin
 

On 19/03/2018 15:58:08, Alexei Podtelezhnikov <address@hidden> wrote:

> > Concretely: is the outline-to-bitmap algorithm definitive and
> > final or is it subject to (probably subtle) changes every now and
> > then?
>
> Most changes happen to the outlines. However, from time to time, both
> the B/W and graymap rasterizers get modified; for such cases it is
> necessary to run the whole test suite.

I doubt that coverage map calculations would fundamentally change. We
literally calculate percentages of square-grid pixels covered by
outlines. There are however rounding errors of two kinds. First, even
currently 64-bit and 32-bit algorithms are different and the resulting
maps are not exactly the same. These differences are not visible to
the naked eye, they are literally rounding errors of ±1 out of 255.
Such discrepancies should not be considered. Second, some rounding
happens when flattening Bézier curves. This can be tuned differently
and the discrepancies might be substantial and visible, The text
appearance perception is however dominated by vertical and horizontal
stems, which are not affected by flattening.

That being said. It is not trivial to judge the improvement of text
appearance from outlines alone without rasterization. I think the
balance between the contrast of images and the regularity in stem and
letter spacing is the key. This balance is highly subjective though.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]