]> granicus.if.org Git - graphviz/commitdiff
remove unused get_font_list
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 18 Mar 2021 00:10:17 +0000 (17:10 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 28 Mar 2021 21:41:54 +0000 (14:41 -0700)
plugin/pango/gvgetfontlist_pango.c

index cee44951ff2ec2067517832c6015df33194c1625..61a62ebe99009db9b5d220fbddcd4c5635f5fa5f 100644 (file)
@@ -528,38 +528,3 @@ gv_font_map* get_font_mapping(PangoFontMap * fontmap)
 #endif
     return gv_fmap;
 }
-
-/* Returns a list of the fonts that are available for use
-
-*/
-
-void get_font_list(char **fonts[], int *cnt){
-
-PangoFontMap *fontmap;
-availfont_t *gv_af_p;
-int j, i;
-char **fontlist;
-fontlist = N_NEW(GV_FONT_LIST_SIZE,char *);
-fontmap = pango_cairo_font_map_new();
-gv_af_p = gv_get_ps_fontlist(fontmap); // get the available installed fonts
-g_object_unref(fontmap);
-/* load array with available font names */
-i=0;
-for (j = 0; j < GV_FONT_LIST_SIZE; j++) {
-       *(fontlist + j) = 0;
-       if ((gv_af_p[j].faces == 0) || (gv_af_p[j].fontname == NULL)) {
-           continue;
-       }
-       *(fontlist + i++) = strdup(gv_af_p[j].fontname);
-}
-/* Free unused array elements */
-for(j=i;j<GV_FONT_LIST_SIZE;j++){
-    free(*(fontlist + j));
-}
-/* Free available fonts structure */
-gv_flist_free_af(gv_af_p);
-
-*cnt = i;
-*fonts = fontlist;
-return;
-}