Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jun 2017 11:31:45 +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-rm5mW0BgKp@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

lightside <lightside@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #183254|0                           |1
        is obsolete|                            |

--- Comment #22 from lightside <lightside@gmx.com> ---
Created attachment 183327
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D183327&action=
=3Dedit
Screenshots for mate-terminal (DejaVu Sans Mono Book, 14)

I found what font was used in "About SciTE" dialog (editors/scite), which
showed some issues (in comment #21). It was "DejaVu Serif Book, 14".
This was found in scite/src/Credits.cxx file for following function:
void SciTEBase::SetAboutMessage(GUI::ScintillaWindow &wsci, const char
*appTitle)
and related code:
wsci.CallString(SCI_STYLESETFONT, STYLE_DEFAULT, "Serif");
int fontSize =3D 14;

where
-8<--
% fc-match Serif
DejaVuSerif.ttf: "DejaVu Serif" "Book"
-->8-

The DejaVuSerif.ttf was installed by x11-fonts/dejavu port and
x11-fonts/xorg-fonts-truetype port depends from it.
-8<--
% pkg which -o /usr/local/share/fonts/dejavu/DejaVuSerif.ttf
/usr/local/share/fonts/dejavu/DejaVuSerif.ttf was installed by package
x11-fonts/dejavu
-->8-

Possible to test "DejaVu Sans Mono Book, 14" for mate-terminal, installed by
the same port:
-8<--
% pkg which -o /usr/local/share/fonts/dejavu/DejaVuSansMono.ttf
/usr/local/share/fonts/dejavu/DejaVuSansMono.ttf was installed by package
x11-fonts/dejavu
-->8-

I attached archive with new screenshots, which shows the difference: decrea=
sed
line spacing (compared to 2.7.1 version), in my case. This may mean, that t=
here
are other differences between 2.7.1 and 2.8 version, based on used fonts (i=
.e.,
the patch in attachment #183237 doesn't work for all cases, if the same res=
ult
needed, as in 2.7.1 version).

As about other testing methods, I created something like follows, based on
pango-view usage (x11-toolkits/pango), but not sure, if this is correct met=
hod:
pango-font.sh:
-8<--
#!/bin/sh

font=3D"Monospace Sans Serif"
dpi=3D"72 96"
size=3D"11 12 13 14"
backend=3D"cairo ft2"
text=3D"The quick brown fox jumps over the lazy dog"
texts=3D`printf "${text}\n${text}\n${text}"`

if [ -n "$1" ]; then
        if ! [ -d "$1" ]; then
                mkdir -p "$1"
        fi
        echo Output directory: $1
        cd "$1"
fi

for f in ${font}; do
        for d in ${dpi}; do
                for s in ${size}; do
                        for b in ${backend}; do
        pango-view -q --backend=3D"${b}" --dpi=3D"${d}" --font=3D"${f} ${s}=
" -t
"${texts}" -o "${f}-${b}-${s}-${d}dpi.png"
                        done
                done
        done
done

sha256 *.png > checksums.txt
-->8-

pango-waterfall.sh
-8<--
#!/bin/sh

font=3D"Monospace Sans Serif"
dpi=3D"72 96"
backend=3D"cairo ft2"
text=3D"The quick brown fox jumps over the lazy dog"

if [ -n "$1" ]; then
        if ! [ -d "$1" ]; then
                mkdir -p "$1"
        fi
        echo Output directory: $1
        cd "$1"
fi

for f in ${font}; do
        for d in ${dpi}; do
                for b in ${backend}; do
        pango-view -q --backend=3D"${b}" --waterfall --dpi=3D"${d}" --font=
=3D"${f}"
-t "${text}" -o "${f}-${b}-${d}dpi.png"
                done
        done
done

sha256 *.png > checksums.txt
-->8-

Then possible to use such scripts to check visual differences and/or checks=
ums
(but they maybe different between runs, while visually almost the same,
somehow).

--=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-rm5mW0BgKp>