[gnome-font-viewer] font-view: compress strings from PostScript fonts
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-font-viewer] font-view: compress strings from PostScript fonts
- Date: Tue, 1 May 2012 15:13:21 +0000 (UTC)
commit adee4f7f27dee51588e3d1c90aba074f766ec416
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue May 1 10:57:00 2012 -0400
font-view: compress strings from PostScript fonts
We need to compress these strings, since they're stored escaped.
src/font-view.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index 89150c9..593b9ae 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -262,10 +262,20 @@ populate_grid (FontViewApplication *self,
g_free (description);
}
} else if (FT_Get_PS_Font_Info (face, &ps_info) == 0) {
- if (ps_info.version && g_utf8_validate (ps_info.version, -1, NULL))
- add_row (grid, _("Version"), ps_info.version, FALSE);
- if (ps_info.notice && g_utf8_validate (ps_info.notice, -1, NULL))
- add_row (grid, _("Copyright"), ps_info.notice, TRUE);
+ gchar *compressed;
+
+ if (ps_info.version && g_utf8_validate (ps_info.version, -1, NULL)) {
+ compressed = g_strcompress (ps_info.version);
+ strip_version (&compressed);
+ add_row (grid, _("Version"), compressed, FALSE);
+ g_free (compressed);
+ }
+ if (ps_info.notice && g_utf8_validate (ps_info.notice, -1, NULL)) {
+ compressed = g_strcompress (ps_info.notice);
+ strip_whitespace (&compressed);
+ add_row (grid, _("Copyright"), compressed, TRUE);
+ g_free (compressed);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]