From a2e58796d827c37a93ae9dd8380cf67951047fa1 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Tue, 10 Dec 2002 02:35:24 +0000 Subject: [PATCH] only display Type1 font information if it is valid UTF-8. 2002-12-10 James Henstridge * src/font-view.c (add_face_info): only display Type1 font information if it is valid UTF-8. --- vfs-methods/fontilus/ChangeLog | 3 +++ vfs-methods/fontilus/font-view.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vfs-methods/fontilus/ChangeLog b/vfs-methods/fontilus/ChangeLog index 2f2320fd8..7a2d6ddbd 100644 --- a/vfs-methods/fontilus/ChangeLog +++ b/vfs-methods/fontilus/ChangeLog @@ -1,5 +1,8 @@ 2002-12-10 James Henstridge + * 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. diff --git a/vfs-methods/fontilus/font-view.c b/vfs-methods/fontilus/font-view.c index ef8cacf78..b92dd9e03 100644 --- a/vfs-methods/fontilus/font-view.c +++ b/vfs-methods/fontilus/font-view.c @@ -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); } }