Text not rendered because of big offset in glyph bbox
Rolf Eike Beer <[email protected]> Thu, 11 Apr 2019 11:20:50 +0200
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | emlix GmbH |
| Message-ID | <2214345.2xeAM7jjKg@devpool35> |
--===============0044040286==
Content-Type: multipart/signed; boundary="nextPart1834956.ZtxaVAX4rp"; micalg="pgp-sha256"; protocol="application/pgp-signature"
--nextPart1834956.ZtxaVAX4rp
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
I try to render some text on a NVidia Tegra system. I'm using cairo 1.16.0 =
and=20
the NVidia drivers.
My testcase is quite simple:
pango-view "--text=3D|" -qo abc.png
=46or me it looks like things get weird in _cairo_scaled_glyph_set_metrics(=
):
The area looks like this:
(gdb) p min_device_y =
=20
$4 =3D -12 =
=20
(gdb) p min_device_x =
=20
$5 =3D 4 =
=20
(gdb) p max_device_x =
=20
$6 =3D 6 =
=20
(gdb) p max_device_y =
=20
$7 =3D 3 =
=20
But that is what ends up in the bbox:
(gdb) p scaled_glyph->bbox
$9 =3D {p1 =3D {x =3D 1119354880, y =3D 1119354879}, p2 =3D {x =3D 11193548=
80, y =3D=20
1119354880}}
In my opinion this looks really strange:
Breakpoint 1, _cairo_fixed_from_double (d=3D4) at cairo-fixed-private.h:118
118 u.d =3D d + CAIRO_MAGIC_NUMBER_FIXED;
(gdb) n
120 return u.i[1];
(gdb) p u
$1 =3D {d =3D 26388279066628, i =3D {1024, 1119354880}}
(gdb) p d
$2 =3D 4
This causes all glyphs to be discarded later:
Breakpoint 3, _cairo_gstate_transform_glyphs_to_backend (gstate=3D0x2eb50,=
=20
glyphs=3D0xbeffe7c0, num_glyphs=3D1, clusters=3D0
x0, num_clusters=3D0, cluster_flags=3D(unknown: 0), transformed_glyphs=3D0x=
beffdf38, =20
num_transformed_glyphs=3D0xbeffd404, transformed_clusters=3D0x0) at cai=
ro-
gstate.c:2297
2297 if (!drop || KEEP_GLYPH (transformed_glyphs[j]))
(gdb) p x1
$14 =3D -160
(gdb) p x2
$15 =3D 190
(gdb) p y1
$16 =3D -160
(gdb) p y2
$17 =3D 199
(gdb) p transformed_glyphs[j]
$18 =3D {index =3D 95, x =3D 4372480, y =3D 4372494}
KEEP_GLYPH will decide that this is far beyond anything reasonable and drop=
=20
it.
Cairo is build with vanilla gcc 8.2.0 and was configured like this:
++ CFLAGS=3D'-O2 -g -mcpu=3Dcortex-a15 -mfloat-abi=3Dhard -mfpu=3Dneon-vfpv=
4 -pipe -
Wl,--no-copy-dt-needed-entries,--as-needed -Wl,--build-id -Wdate-time -O0'
++ ./configure --build=3Dx86_64-pc-linux-gnu --host=3Darm-unknown-linux-gnu=
eabi --
target=3Darm-unknown-linux-gnueabi --prefix=3D/usr --disable-silent-rules --
enable-gobject=3Dyes --enable-gl
Can anyone give me a hint where I need to poke to get that right?
Eike
=2D-=20
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
=46on +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 G=C3=B6ttingen, Germany
Sitz der Gesellschaft: G=C3=B6ttingen, Amtsgericht G=C3=B6ttingen HR B 3160
Gesch=C3=A4ftsf=C3=BChrung: Heike Jordan, Dr. Uwe Kracke =E2=80=93 Ust-IdNr=
=2E: DE 205 198 055
emlix - smart embedded open source
--nextPart1834956.ZtxaVAX4rp
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit
-----BEGIN PGP SIGNATURE-----
iLMEAAEIAB0WIQQ/Uctzh31xzAxFCLur5FH7Xu2t/AUCXK8G8gAKCRCr5FH7Xu2t
/K7qA/wI18kw0A9JynhEOqZRDaiCkWkL9knmDiy2DXeGZP94j5M4VwBVYa5KzY+D
7p2E3dScYsbdgKJcZilYIN1icp1lGj4TnIyAnagvaT2wf6IF6/A0hDN+IF0KD3+v
LCHFoj3bGV4TSQ/GtEczpqT/KSAGTC61oHmdHdLq1K60p49rvg==
=IZf2
-----END PGP SIGNATURE-----
--nextPart1834956.ZtxaVAX4rp--
--===============0044040286==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp
c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8=
--===============0044040286==--