summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-19 04:16:58 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-08-19 04:16:58 +0000
commite08269b8847d64843498f7ebf5bc6e5de6fbc45e (patch)
tree023d32b2918309764170e4c9e46a28ce18b5a6fb
parent2b84ec4c130f646b5121d2a3d762e327769456a4 (diff)
parent0c25ed9998bb5c6f2f8134f4469daca460f76667 (diff)
downloadpango-e08269b8847d64843498f7ebf5bc6e5de6fbc45e.tar.gz
Merge branch 'minor-fix' into 'master'
Minor fixes Closes #495 See merge request GNOME/pango!224
-rw-r--r--pango/fonts.c2
-rw-r--r--pango/pango-layout.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index e83abbbe..1695366b 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1799,7 +1799,7 @@ pango_font_get_glyph_extents (PangoFont *font,
}
if (logical_rect)
{
- logical_rect->x = logical_rect->y = 0;
+ logical_rect->x = 0;
logical_rect->y = - PANGO_UNKNOWN_GLYPH_HEIGHT * PANGO_SCALE;
logical_rect->height = PANGO_UNKNOWN_GLYPH_HEIGHT * PANGO_SCALE;
logical_rect->width = PANGO_UNKNOWN_GLYPH_WIDTH * PANGO_SCALE;
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 92d858b2..7d5b9b10 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3609,6 +3609,9 @@ find_hyphen_width (PangoItem *item)
hb_font_t *hb_font;
hb_codepoint_t glyph;
+ if (!item->analysis.font)
+ return 0;
+
/* This is not technically correct, since
* a) we may end up inserting a different hyphen
* b) we should reshape the entire run