only display Type1 font information if it is valid UTF-8.

2002-12-10  James Henstridge  <james@daa.com.au>

    * src/font-view.c (add_face_info): only display Type1 font
    information if it is valid UTF-8.
This commit is contained in:
James Henstridge 2002-12-10 02:35:24 +00:00 committed by James Henstridge
parent d807c7541f
commit a2e58796d8
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,8 @@
2002-12-10 James Henstridge <james@daa.com.au>
* src/font-view.c (add_face_info): only display Type1 font
information if it is valid UTF-8.
* src/ftstream-vfs.c (FT_New_Face_From_URI): get rid of the local
file optimisation. It didn't make a noticable difference for the
large Asian fonts.

View file

@ -253,10 +253,9 @@ add_face_info(GtkWidget *table, gint *row_p, const gchar *uri, FT_Face face)
g_free(description);
}
} else if (FT_Get_PS_Font_Info(face, &ps_info) == 0) {
/* XXXX need to handle encoding of this info ... */
if (ps_info.version)
if (ps_info.version && g_utf8_validate(ps_info.version, -1, NULL))
add_row(table, row_p, _("Version:"), ps_info.version, FALSE);
if (ps_info.notice)
if (ps_info.notice && g_utf8_validate(ps_info.notice, -1, NULL))
add_row(table, row_p, _("Copyright:"), ps_info.notice, TRUE);
}
}