bugfix by Kevin Brubeck Unhammer
git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@278 1aa58f4a-7d42-0410-adbc-911cccaed67cpull/1/head
parent
e0c2c65d90
commit
f4ced29713
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<div align=right class=lastmod>
|
<div align=right class=lastmod>
|
||||||
<!-- hhmts start -->
|
<!-- hhmts start -->
|
||||||
Last Modified: Sun Nov 14 15:03:59 UTC 2010
|
Last Modified: Thu Dec 23 12:21:16 UTC 2010
|
||||||
<!-- hhmts end -->
|
<!-- hhmts end -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ Python PDF parser and analyzer
|
||||||
<a href="http://www.unixuser.org/~euske/python/pdfminer/index.html">Homepage</a>
|
<a href="http://www.unixuser.org/~euske/python/pdfminer/index.html">Homepage</a>
|
||||||
|
|
||||||
<a href="#changes">Recent Changes</a>
|
<a href="#changes">Recent Changes</a>
|
||||||
|
|
||||||
|
<a href="programming.html">PDFMiner API</a>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="#intro">What's It?</a>
|
<li> <a href="#intro">What's It?</a>
|
||||||
|
@ -349,7 +351,8 @@ no stream header is displayed for the ease of saving it to a file.
|
||||||
|
|
||||||
<h2><a name="changes">Changes</a></h2>
|
<h2><a name="changes">Changes</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li> 2010/10/17: A couple of bugfixes and a minor improvement. Thanks to standardabweichung and Alastair Irving.
|
<li> 2010/12/xx: A couple of bugfixes and minor improvements. Thanks to Kevin Brubeck Unhammer.
|
||||||
|
<li> 2010/10/17: A couple of bugfixes and minor improvements. Thanks to standardabweichung and Alastair Irving.
|
||||||
<li> 2010/09/07: A minor bugfix. Thanks to Alexander Garden.
|
<li> 2010/09/07: A minor bugfix. Thanks to Alexander Garden.
|
||||||
<li> 2010/08/29: A couple of bugfixes. Thanks to Sahan Malagi, pk, and Humberto Pereira.
|
<li> 2010/08/29: A couple of bugfixes. Thanks to Sahan Malagi, pk, and Humberto Pereira.
|
||||||
<li> 2010/07/06: Minor bugfixes. Thanks to Federico Brega.
|
<li> 2010/07/06: Minor bugfixes. Thanks to Federico Brega.
|
||||||
|
|
|
@ -424,14 +424,14 @@ class PDFFont(object):
|
||||||
def __init__(self, descriptor, widths, default_width=None):
|
def __init__(self, descriptor, widths, default_width=None):
|
||||||
self.descriptor = descriptor
|
self.descriptor = descriptor
|
||||||
self.widths = widths
|
self.widths = widths
|
||||||
self.fontname = descriptor.get('FontName', 'unknown')
|
self.fontname = resolve1(descriptor.get('FontName', 'unknown'))
|
||||||
if isinstance(self.fontname, PSLiteral):
|
if isinstance(self.fontname, PSLiteral):
|
||||||
self.fontname = literal_name(self.fontname)
|
self.fontname = literal_name(self.fontname)
|
||||||
self.flags = int_value(descriptor.get('Flags', 0))
|
self.flags = int_value(descriptor.get('Flags', 0))
|
||||||
self.ascent = num_value(descriptor.get('Ascent', 0))
|
self.ascent = num_value(descriptor.get('Ascent', 0))
|
||||||
self.descent = num_value(descriptor.get('Descent', 0))
|
self.descent = num_value(descriptor.get('Descent', 0))
|
||||||
self.italic_angle = num_value(descriptor.get('ItalicAngle', 0))
|
self.italic_angle = num_value(descriptor.get('ItalicAngle', 0))
|
||||||
self.default_width = default_width or descriptor.get('MissingWidth', 0)
|
self.default_width = default_width or num_value(descriptor.get('MissingWidth', 0))
|
||||||
self.leading = num_value(descriptor.get('Leading', 0))
|
self.leading = num_value(descriptor.get('Leading', 0))
|
||||||
self.bbox = list_value(descriptor.get('FontBBox', (0,0,0,0)))
|
self.bbox = list_value(descriptor.get('FontBBox', (0,0,0,0)))
|
||||||
self.hscale = self.vscale = .001
|
self.hscale = self.vscale = .001
|
||||||
|
|
Loading…
Reference in New Issue