Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Jul 2017 08:58:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        gnome@FreeBSD.org
Subject:   [Bug 219608] print/freetype2 produces incorrect line spacing for some fonts
Message-ID:  <bug-219608-6497-hPmj6KtnUd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-219608-6497@https.bugs.freebsd.org/bugzilla/>
References:  <bug-219608-6497@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219608

--- Comment #28 from lightside <lightside@gmx.com> ---
Created attachment 183981
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D183981&action=
=3Dedit
Some test results (need statically built font_info to reproduce)

(In reply to comment #22)
I found what font sizes were used in pango-view application for waterfall:
https://github.com/GNOME/pango/blob/1.40.6/pango-view/viewer-render.c#L189-=
L194.
Looks like, font sizes between 8 and 48, per 4 increment.

Based on this, I created testing script for font_info console application (=
see
comment #24 or attachment #183980 from comment #27 for source code) to test
between 1 and 100 sizes for "DejaVu Sans Mono Book" and "Bitstream Vera Sans
Mono Roman" fonts:
-8<-- check_fonts.sh
#!/bin/sh

testapp=3D./font_info
results=3Dresults.txt
font=3D"/usr/local/share/fonts/dejavu/DejaVuSansMono.ttf
/usr/local/share/fonts/bitstream-vera/VeraMono.ttf"
dpi=3D"72 96"
size=3D"$(seq 1 100)"

if ! [ -f "${testapp}" ]; then
        echo "The ${testapp} file doesn't exist in the ${PWD} directory"
        exit 1
fi

if [ -f "${results}" ]; then
        mv -f "${results}" "${results}.bak"
        touch "${results}"
fi

for f in ${font}; do
        if ! [ -f ${f} ]; then
                echo "The ${f} font doesn't exist"
                continue
        fi
        for d in ${dpi}; do
                for s in ${size}; do
                        ${testapp} -d "${d}" -s "${s}" ${f} >> "${results}"
                done
        done
done

sha256 "${results}" > checksum.txt
-->8-

It showed the same results between 2.7.1 and 2.8_1 (with FIX_SIZE_METRICS
option; results/2.7.1/results.txt, results/2.8_1_fix_size_metrics/results.t=
xt),
with using patch in attachment #183977. But different results for previous
patch in attachment #183237 (results/2.8_1_fix_size_metrics_prev/results.tx=
t),
2.8 (with TT_SIZE_METRICS option and related patch for src/truetype/ttobjs.=
c;
results/2.8_ttobjs/results.txt, just in case).

Results were attached to archive.

Some generated pango-view images, mentioned in comment #22, was placed to
another location (because of file size restrictions; for about 2 months):
https://files.fm/f/u6zx8wnj
SHA256 (pango-view_images.tar.bz2) =3D
8395b15cd5c5900a9f6e4337008e77b55d17dad924c6a2a9cfae86fad4b0c68c

The pango-view images (e.g. for Monospace-cairo-96dpi.png image) shows, that
line spacing is the same between 2.7 and 2.8_1_fix_size_metrics, but some
glyphs (may) look different. In the same time, the glyphs between
2.8_tt_size_metrics and 2.8_1_fix_size_metrics (may) look the same, but
different line spacing. Probably, this is feature of 2.8 version (or pango-=
view
related), where font rendering was changed for some fonts (and sizes). Agai=
n,
checksums for ft2 backend may be different (compared to cairo backend), but
visually the same.

(In reply to comment #24)
> -8<-- font_info
I meant font_info.c file, which possible to build with using following
commands:
For static freetype2 library (e.g. after building of it, near include, objs,
src, etc. directories):
% cc -DFT2_BUILD_LIBRARY -Iinclude -L/usr/local/lib -o font_info font_info.c
objs/.libs/libfreetype.a -lz -lbz2 -lpng
For dynamic freetype2 library:
% cc -I/usr/local/include/freetype2 -L/usr/local/lib -o font_info font_info=
.c
-lfreetype -lz -lbz2 -lpng

--=20
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219608-6497-hPmj6KtnUd>