After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675925 - Include substitute font name and file in font list
Include substitute font name and file in font list
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: PDF
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-12 07:24 UTC by Adrian Johnson
Modified: 2012-05-19 07:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
include substitute font name in font list (2.32 KB, patch)
2012-05-12 07:25 UTC, Adrian Johnson
needs-work Details | Review
include substitute font name in font list (2.43 KB, patch)
2012-05-13 08:30 UTC, Adrian Johnson
committed Details | Review

Description Adrian Johnson 2012-05-12 07:24:22 UTC
The attached patch displays the name and filename of substitute fonts in the document font list. This helps the user resolve issues with substitution of non embedded fonts by showing which font poppler has substituted.

The patch depends on new api in poppler 0.20.
Comment 1 Adrian Johnson 2012-05-12 07:25:48 UTC
Created attachment 213906 [details] [review]
include substitute font name in font list
Comment 2 Carlos Garcia Campos 2012-05-12 09:58:28 UTC
Review of attachment 213906 [details] [review]:

Thanks for the patch.

::: backend/pdf/ev-poppler.cc
@@ +1061,3 @@
+
+		printf("subs: %s\n", substitute);
+		printf("file: %s\n", filename);

I guess you forgot to remove these printfs :-)

@@ +1063,3 @@
+		printf("file: %s\n", filename);
+		if (substitute && filename)
+			details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s, substituting with <b>%s</b>\n(%s)", type, encoding, embedded, substitute, filename);

This should be marked for translation

@@ +1065,3 @@
+			details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s, substituting with <b>%s</b>\n(%s)", type, encoding, embedded, substitute, filename);
+		else
+			details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s", type, encoding, embedded);

Ditto.
Comment 3 Adrian Johnson 2012-05-13 08:30:08 UTC
Created attachment 213950 [details] [review]
include substitute font name in font list

updated patch
Comment 4 Carlos Garcia Campos 2012-05-19 07:44:15 UTC
Review of attachment 213950 [details] [review]:

Pushed to git master. Thanks!