[cairo] Text not rendered because of big offset in glyph bbox
Rolf Eike Beer
eb at emlix.com
Thu Apr 11 09:20:50 UTC 2019
I try to render some text on a NVidia Tegra system. I'm using cairo 1.16.0 and
the NVidia drivers.
My testcase is quite simple:
pango-view "--text=|" -qo abc.png
For me it looks like things get weird in _cairo_scaled_glyph_set_metrics():
The area looks like this:
(gdb) p min_device_y
$4 = -12
(gdb) p min_device_x
$5 = 4
(gdb) p max_device_x
$6 = 6
(gdb) p max_device_y
$7 = 3
But that is what ends up in the bbox:
(gdb) p scaled_glyph->bbox
$9 = {p1 = {x = 1119354880, y = 1119354879}, p2 = {x = 1119354880, y =
1119354880}}
In my opinion this looks really strange:
Breakpoint 1, _cairo_fixed_from_double (d=4) at cairo-fixed-private.h:118
118 u.d = d + CAIRO_MAGIC_NUMBER_FIXED;
(gdb) n
120 return u.i[1];
(gdb) p u
$1 = {d = 26388279066628, i = {1024, 1119354880}}
(gdb) p d
$2 = 4
This causes all glyphs to be discarded later:
Breakpoint 3, _cairo_gstate_transform_glyphs_to_backend (gstate=0x2eb50,
glyphs=0xbeffe7c0, num_glyphs=1, clusters=0
x0, num_clusters=0, cluster_flags=(unknown: 0), transformed_glyphs=0xbeffdf38,
num_transformed_glyphs=0xbeffd404, transformed_clusters=0x0) at cairo-
gstate.c:2297
2297 if (!drop || KEEP_GLYPH (transformed_glyphs[j]))
(gdb) p x1
$14 = -160
(gdb) p x2
$15 = 190
(gdb) p y1
$16 = -160
(gdb) p y2
$17 = 199
(gdb) p transformed_glyphs[j]
$18 = {index = 95, x = 4372480, y = 4372494}
KEEP_GLYPH will decide that this is far beyond anything reasonable and drop
it.
Cairo is build with vanilla gcc 8.2.0 and was configured like this:
++ CFLAGS='-O2 -g -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4 -pipe -
Wl,--no-copy-dt-needed-entries,--as-needed -Wl,--build-id -Wdate-time -O0'
++ ./configure --build=x86_64-pc-linux-gnu --host=arm-unknown-linux-gnueabi --
target=arm-unknown-linux-gnueabi --prefix=/usr --disable-silent-rules --
enable-gobject=yes --enable-gl
Can anyone give me a hint where I need to poke to get that right?
Eike
--
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
emlix - smart embedded open source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 313 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.cairographics.org/archives/cairo/attachments/20190411/eba3f8f4/attachment.sig>
More information about the cairo
mailing list