Bug 46888 - make pdffonts list the font encodings
Summary: make pdffonts list the font encodings
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-03-02 04:29 UTC by Adrian Johnson
Modified: 2012-03-03 06:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
list font encodings (6.58 KB, patch)
2012-03-02 04:29 UTC, Adrian Johnson
Details | Splinter Review
list font encodings (6.51 KB, patch)
2012-03-02 19:23 UTC, Adrian Johnson
Details | Splinter Review

Description Adrian Johnson 2012-03-02 04:29:23 UTC
Created attachment 57915 [details] [review]
list font encodings

This patch makes pdffonts include the font encoding in the list of fonts.
Comment 1 Albert Astals Cid 2012-03-02 10:04:52 UTC
GfxCIDFont::GfxCIDFont has some goto in case of error, that will result in encodingName = NULL; and encoding = font->getEncodingName()->copy(); crashing
Comment 2 Adrian Johnson 2012-03-02 19:23:03 UTC
Created attachment 57952 [details] [review]
list font encodings

I've updated the patch to initialize the encoding to an empty string in the GfxFont constructor so it will always be set to something. Would initializing it to something like "Unknown" or "???" be better or should I just leave it blank?
Comment 3 Albert Astals Cid 2012-03-03 06:25:47 UTC
Don't have a strong opinion on that, do whatever you prefer.

You have a indentation mismatch with
+		 font->getEncoding()->getCString(),
and the rest of the lines around it (tab vs spaces), yours is probably using the "right" poppler encoding, but please change it so that it uses what the lines above and below it use.

Then feel free to commit.
Comment 4 Adrian Johnson 2012-03-03 06:39:14 UTC
pushed


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.