[Bug 219608] print/freetype2 produces incorrect line spacing for some fonts
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Jul 1 08:58:52 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219608
--- Comment #28 from lightside <lightside at gmx.com> ---
Created attachment 183981
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=183981&action=edit
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=./font_info
results=results.txt
font="/usr/local/share/fonts/dejavu/DejaVuSansMono.ttf
/usr/local/share/fonts/bitstream-vera/VeraMono.ttf"
dpi="72 96"
size="$(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.txt),
with using patch in attachment #183977. But different results for previous
patch in attachment #183237 (results/2.8_1_fix_size_metrics_prev/results.txt),
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) =
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). Again,
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
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
More information about the freebsd-gnome
mailing list