[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Splitting up the GSoC project (Re: Freetype-devel Digest,
From: |
Hin-Tak Leung |
Subject: |
Re: [ft-devel] Splitting up the GSoC project (Re: Freetype-devel Digest, Vol 148, Issue 36) |
Date: |
Mon, 29 May 2017 23:46:41 +0000 (UTC) |
--------------------------------------------
On Mon, 29/5/17, Arvinder Bhathal <address@hidden> wrote:
> > 2.
pick any one font, actually generate 26 images of A to Z,
for two versions of freetype, to get a feeling of what sort
of bitmap differences you are likely to get.
> Although I'm unsure of the
feasibility of it, my initial thought was
to
sum the pixel intensity differences between the baseline and
test
glyphs. Supposedly, these values could
be stored for every glyph
(although maybe
not for 12 million) in an index, and we could consider
these values when displaying the glyphs in the
browser. This could
help focus on the pairs
with the greatest differences. However, as
you've said in your second suggestion, a
demo test will help determine
what sort of
comparison method will do.
I suspect for most glyphs in most fonts, you would get identical bitmaps for
B/W and 8-bit rendering between not-too-distant freetype versions. (LCD is a
different matter lately). So the actual numbers of glyphs you need to examine
at all, is a small fraction of of a large number. Hence you might need to test
quite a few fonts before you get "interesting" differences.
As for quantifying differences - just summing pixel difference isn't a good
measure. The differences is likely to be corner pixels or whole edges; i.e. a
corner or a whole edge has moved slightly. I'd probably suggest somehow taking
connected-ness into account - e.g. if you draw a square of 4x4 pixels, the 4
corner pixels being slightly darker/lighter, is less important than a whole
edge of 4 pixels being darker/lighter. So you weight the difference by how many
nearby pixels also show differences.
A complicated shape will have a lot of sharp corners and the many corners may
go darker/lighter, but these are less important than one stem of a simple shape
going thicker. If you only count number of pixels differing, the first case
might have a higher "score" of differences.
Anyway, I think it is best your people have a go at looking at say, differences
of bitmaps of say A-Z of one font you choose, and see what sort of difference
you can get, to get a first-hand feeling about it.