[gtk/pango2: 4/8] Compare family names case-insensitively
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pango2: 4/8] Compare family names case-insensitively
- Date: Mon, 4 Jul 2022 14:40:16 +0000 (UTC)
commit 897195b2f59721317fcc17602e21de7e2ac0f56e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 19 09:55:33 2022 -0700
Compare family names case-insensitively
demos/gtk-demo/pickers.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index 05d831221f..442a9f8a12 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -28,7 +28,13 @@ filter_font_cb (const PangoFontFamily *family,
family_name = pango_font_family_get_name (PANGO_FONT_FAMILY (family));
- return g_strv_contains (alias_families, family_name);
+ for (int i = 0; alias_families[i]; i++)
+ {
+ if (g_ascii_strcasecmp (alias_families[i], family_name) == 0)
+ return TRUE;
+ }
+
+ return FALSE;
}
#define COLOR(r,g,b) { r/255., g/255., b/255., 1.0 }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]