Bug 44416 - Add -subst option to pdffonts to show the substituted fonts
Summary: Add -subst option to pdffonts to show the substituted fonts
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 03:27 UTC by Adrian Johnson
Modified: 2012-01-06 16:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
add -subst option to pdffonts (9.03 KB, patch)
2012-01-03 03:27 UTC, Adrian Johnson
Details | Splinter Review

Description Adrian Johnson 2012-01-03 03:27:17 UTC
Created attachment 55073 [details] [review]
add -subst option to pdffonts

It would be useful to provide a way to find the fontname and filename of the fonts used to substitute for non embedded fonts. The attached patch adds a "-subst" option that shows for each non embedded font: 
  - pdf font name
  - full name of substitute font
  - file name of substitute font
Comment 1 Albert Astals Cid 2012-01-05 15:09:05 UTC
The spacing in the GlobalParams::getDisplayFont looks a bit broken, 

+        if (res == FcResultMatch && s2) {
+          substName = new GooString((char*)s2);
+	} else {

the if has spaces but the else has tabs

Also i'd just add the subst info all the time, why a switch?
Comment 2 Adrian Johnson 2012-01-06 15:31:38 UTC
(In reply to comment #1)
> Also i'd just add the subst info all the time, why a switch?

I thought it was better not to clutter the default output with too much information. There is also the question of how to format the output. Do you want to add the extra info (substitute fontname and filename) to the end of each line which is going to make the each line very long. Or can the info can be put on the next line or listed separately at the end of the current output?
Comment 3 Albert Astals Cid 2012-01-06 15:44:59 UTC
Yeah, length is a concern... ok, let's do it your way then, update the manpage and commit it to master.
Comment 4 Adrian Johnson 2012-01-06 16:10:06 UTC
I've fixed the spacing, updated the man page and pushed to master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.