mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 20:50:12 +00:00
text: Don't produce fontless text nodes
Pango items can in fact come out of itemization without a font, and pango limps along, trying to render hexboxes in this case. For gsk, it seems much easier to just not generate anything in this corner case, rather than trying to make everything we do with the font NULL-safe.
This commit is contained in:
parent
b43876dd26
commit
6663ad53a0
@ -112,12 +112,13 @@ gsk_pango_renderer_draw_glyph_item (PangoRenderer *renderer,
|
||||
|
||||
get_color (crenderer, PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
gtk_snapshot_append_text2 (crenderer->snapshot,
|
||||
glyph_item->item->analysis.font,
|
||||
glyph_item->glyphs,
|
||||
&color,
|
||||
(float) x / PANGO_SCALE,
|
||||
(float) y / PANGO_SCALE);
|
||||
if (glyph_item->item->analysis.font)
|
||||
gtk_snapshot_append_text2 (crenderer->snapshot,
|
||||
glyph_item->item->analysis.font,
|
||||
glyph_item->glyphs,
|
||||
&color,
|
||||
(float) x / PANGO_SCALE,
|
||||
(float) y / PANGO_SCALE);
|
||||
|
||||
gdk_color_finish (&color);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user