From 916d19e025049cd970b9298a4dca03a034e603e5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 10 Jan 2023 19:06:16 +0100 Subject: Ignore case (ASCII) when comparing font descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libfonts_do_decoded_font_descriptions_match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfonts_do_decoded_font_descriptions_match.c b/libfonts_do_decoded_font_descriptions_match.c index 24d3268..091382e 100644 --- a/libfonts_do_decoded_font_descriptions_match.c +++ b/libfonts_do_decoded_font_descriptions_match.c @@ -35,7 +35,7 @@ equal(const char *desc, const char *spec) return 0; for (; desc[i] && spec[i]; i++) - if (spec[i] != desc[i] && spec[i] != '?') + if (tolower(spec[i]) != tolower(desc[i]) && spec[i] != '?') return 0; return desc[i] == spec[i]; @@ -56,7 +56,7 @@ many_equal(const char *desc, const char *spec) desc++; } else { while (*spec && *desc && *spec != '-' && *desc != '-') { - if (*spec != *desc && *spec != '?') + if (tolower(*spec) != tolower(*desc) && *spec != '?') return 0; } } -- cgit v1.2.3-70-g09d2