diff options
-rw-r--r-- | pango/break.c | 3 | ||||
-rw-r--r-- | pango/pangocoretext-fontmap.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pango/break.c b/pango/break.c index 229a199a..0b636af9 100644 --- a/pango/break.c +++ b/pango/break.c @@ -127,7 +127,8 @@ static const CharJamoProps HangulJamoProps[] = { #define KANA(wc) ((wc) >= 0x3040 && (wc) <= 0x30FF) #define HANGUL(wc) ((wc) >= 0xAC00 && (wc) <= 0xD7A3) #define EMOJI(wc) (_pango_Is_Emoji_Base_Character (wc)) -#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA (wc) && !HANGUL (wc) && !EMOJI (wc)) +#define MATH(wc) ((wc) >= 0x2200 && (wc) <= 0x22FF) +#define BACKSPACE_DELETES_CHARACTER(wc) (!LATIN (wc) && !CYRILLIC (wc) && !GREEK (wc) && !KANA (wc) && !HANGUL (wc) && !EMOJI (wc) && !MATH (wc)) /* Previously "123foo" was two words. But in UAX 29 of Unicode, * we know don't break words between consecutive letters and numbers diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c index 6e59a4f9..7ce5ac08 100644 --- a/pango/pangocoretext-fontmap.c +++ b/pango/pangocoretext-fontmap.c @@ -646,7 +646,7 @@ pango_core_text_family_list_faces (PangoFontFamily *family, italic_faces = g_hash_table_new (g_direct_hash, g_direct_equal); - count = CFArrayGetCount (ctfaces); + count = ctfaces ? CFArrayGetCount (ctfaces) : 0; for (i = 0; i < count; i++) { PangoCoreTextFace *face; @@ -666,7 +666,7 @@ pango_core_text_family_list_faces (PangoFontFamily *family, CFRelease (font_descriptors); CFRelease (attributes); - CFRelease (ctfaces); + if (ctfaces) CFRelease (ctfaces); /* For all fonts for which a non-synthetic italic variant does * not exist on the system, we create synthesized versions here. |