Przeglądaj źródła

update font.c

Signed-off-by: yangfasheng <yangfasheng@rt-thread.com>
yangfasheng 7 lat temu
rodzic
commit
2f65b1e0a3
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      src/font.c

+ 1 - 2
src/font.c

@@ -156,8 +156,7 @@ struct rtgui_font *rtgui_font_refer(const char *family, rt_uint16_t height)
     rtgui_list_foreach(node, &_rtgui_font_list)
     {
         font = rtgui_list_entry(node, struct rtgui_font, list);
-        if ((rt_strncmp(font->family, family, GUIENGINE_NAME_MAX) == 0) &&
-                font->height == height)
+        if ((rt_strcasecmp(font->family, family) == 0) && font->height == height)
         {
             font->refer_count ++;
             return font;