[gtk/pango2: 82/91] Compare family names case-insensitively
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pango2: 82/91] Compare family names case-insensitively
- Date: Mon, 4 Jul 2022 14:13:32 +0000 (UTC)
commit 3e080f988de9b384ddf7104b788a0c2887e63bc8
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 2752673f2a..07763ba46d 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 ((PangoFontFamily *)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]