diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-14 16:27:09 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-14 16:27:09 +0000 |
commit | 48a8ab2f6f6d532ee3d5058e32afe5c7f2a53b47 (patch) | |
tree | b9e226775875ea1ceaf79d10bf255a22d0b3453f | |
parent | 1d580bd003b8c998e2e410c12ca84f097c56f853 (diff) | |
parent | d6666371ae35ed897fd1b772b3f8403f0f252509 (diff) | |
download | pango-48a8ab2f6f6d532ee3d5058e32afe5c7f2a53b47.tar.gz |
Merge branch 'no-fontmap-no-fun' into 'main'
Check for fontmaps
Closes #658
See merge request GNOME/pango!578
-rw-r--r-- | pango/itemize.c | 2 | ||||
-rw-r--r-- | pango/pango-utils.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pango/itemize.c b/pango/itemize.c index 442fe8e9..01399b7e 100644 --- a/pango/itemize.c +++ b/pango/itemize.c @@ -1546,6 +1546,8 @@ pango_itemize_with_font (PangoContext *context, { ItemizeState state; + g_return_val_if_fail (context->font_map != NULL, NULL); + if (length == 0 || g_utf8_get_char (text + start_index) == '\0') return NULL; diff --git a/pango/pango-utils.c b/pango/pango-utils.c index 886e3d1d..b942921e 100644 --- a/pango/pango-utils.c +++ b/pango/pango-utils.c @@ -1171,9 +1171,9 @@ _pango_shape_get_extents (gint n_chars, * or Unicode paragraph separator character. * * The index of the run of delimiters is returned in - * @paragraph_delimiter_index. The index of the start - * of the paragrap (index after all delimiters) is stored - * in @next_paragraph_start. + * @paragraph_delimiter_index. The index of the start of the + * next paragraph (index after all delimiters) is stored n + * @next_paragraph_start. * * If no delimiters are found, both @paragraph_delimiter_index * and @next_paragraph_start are filled with the length of @text |