;ò
¼0sDc           @   s™  d  Z  d Z d k Z d k l Z l Z d k l Z l Z d k	 l
 Z
 d k l Z l Z d „  Z d e i f d	 „  ƒ  YZ e i d
 d ƒ d „ Z d k l Z l Z l Z e d „ Z e d „ Z d „  Z d „  Z d „  Z d „  Z d k Z y d k Z Wn@ e j
 o4 y d k  l Z WqCe j
 o e! Z qCXn Xy e i" Z" Wn d „  Z" n Xy e i# Z# Wn- e i$ d j o d „  Z# q d „  Z# n Xy e i% Z% Wn d „  Z% n X[ [ d d >Z& d d >Z' d d >Z( d d >Z) d d >Z* d d >Z+ d d >Z, d d  >Z- d d! >Z. d d" >Z/ d d# >Z0 d d$ >Z1 d d% >Z2 d& „  Z3 d' f  d( „  ƒ  YZ4 d) f  d* „  ƒ  YZ5 d+ e4 f d, „  ƒ  YZ6 d d d >Z7 d d d >Z8 d d d >Z9 d d d >Z: d d d >Z; d d  d >Z< d d- d >Z= d d. d >Z> d d/ d >Z? d0 e6 e i@ f d1 „  ƒ  YZA d2 f  d3 „  ƒ  YZB d4 f  d5 „  ƒ  YZC y2 d6 k lD ZD d kE ZE eE iF eD e! eC ƒ eC _G Wn e j
 o n Xd S(7   sÈ  TrueType font support

This defines classes to represent TrueType fonts.  They know how to calculate
their own width and how to write themselves into PDF files.  They support
subsetting and embedding and can represent all 16-bit Unicode characters.

Note on dynamic fonts
---------------------

Usually a Font in ReportLab corresponds to a fixed set of PDF objects (Font,
FontDescriptor, Encoding).  But with dynamic font subsetting a single TTFont
will result in a number of Font/FontDescriptor/Encoding object sets, and the
contents of those will depend on the actual characters used for printing.

To support dynamic font subsetting a concept of "dynamic font" was introduced.
Dynamic Fonts have a _dynamicFont attribute set to 1.  Since other Font object
may lack a this attribute, you should use constructs like

    if getattr(font, '_dynamicFont', 0):
        # dynamic font
    else:
        # traditional static font

Dynamic fonts have the following additional functions:

    def splitString(self, text, doc):
        '''Splits text into a number of chunks, each of which belongs to a
        single subset.  Returns a list of tuples (subset, string).  Use
        subset numbers with getSubsetInternalName.  Doc is used to identify
        a document so that different documents may have different dynamically
        constructed subsets.'''

    def getSubsetInternalName(self, subset, doc):
        '''Returns the name of a PDF Font object corresponding to a given
        subset of this dynamic font.  Use this function instead of
        PDFDocument.getInternalFontName.'''

You must never call PDFDocument.getInternalFontName for dynamic fonts.

If you have a traditional static font, mapping to PDF text output operators
is simple:

   '%s 14 Tf (%s) Tj' % (getInternalFontName(psfontname), text)

If you have a dynamic font, use this instead:

   for subset, chunk in font.splitString(text, doc):
       '%s 14 Tf (%s) Tj' % (font.getSubsetInternalName(subset, doc), chunk)

(Tf is a font setting operator and Tj is a text ouput operator.  You should
also escape invalid characters in Tj argument, see TextObject._formatText.
Oh, and that 14 up there is font size.)

Canvas and TextObject have special support for dynamic fonts.
s4   $Id: ttfonts.py 2865 2006-05-15 16:37:44Z rgbecker $N(   s
   StringTypes   UnicodeType(   s   packs   unpack(   s   StringIO(   s
   pdfmetricss   pdfdocc         C   s   t  d t d |  ƒ ƒ d Sd  S(   Ns   ls   Li    (   s   unpacks   packs   L(   s   L(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   _L2U32D   s    s   TTFErrorc           B   s   t  Z d  Z RS(   s   TrueType font exception(   s   __name__s
   __module__s   __doc__(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   TTFErrorG   s    s
   0123456789s
   ABCDEFGHIJc         C   s   d |  i | ƒ Sd  S(   Ns   %6.6d(   s   ns	   translates   table(   s   ns   table(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   SUBSETNL   s    (   s   utf_8_encodes   utf_8_decodes   latin_1_decodec         C   s   t  t | |  ƒ d ƒ S(   Ni    (   s   maps   ords   decodes   x(   s   xs   decode(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   <lambda>S   s    c         C   s   t  t |  ƒ d ƒ d Sd S(   s.   helper to convert when needed from latin inputi    N(   s   utf_8_encodes   latin_1_decodes   text(   s   text(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   latin1_to_utf8U   s     c         C   sš   d d d d d |  d |  d d d	 |  d
 d d t | ƒ d d d t | ƒ g t | d „ t t | ƒ ƒ ƒ d d d d d g } t i | d ƒ Sd S(   su   Creates a ToUnicode CMap for a given subset.  See Adobe
    _PDF_Reference (ISBN 0-201-75839-3) for more information.s$   /CIDInit /ProcSet findresource begins   12 dict begins	   begincmaps   /CIDSystemInfos   << /Registry (%s)s   /Ordering (%s)s   /Supplement 0s   >> defs   /CMapName /%s defs   /CMapType 2 defs   1 begincodespaceranges   <00> <%02X>i   s   endcodespaceranges   %d beginbfcharc         C   s   d |  | |  f S(   Ns   <%02X> <%04X>(   s   ns   subset(   s   ns   subset(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   <lambda>k   s    s	   endbfchars   endcmaps-   CMapName currentdict /CMap defineresource pops   ends   
N(   s   fontnames   lens   subsets   maps   xranges   cmaps   strings   join(   s   fontnames   subsets   cmap(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   makeToUnicodeCMapY   s     ])c         C   s"   |  |  | |  | t | ƒ Sd S(   sx   Splices the given value into stream at the given offset and
    returns the resulting stream (the original is unchanged)N(   s   streams   offsets   values   len(   s   streams   offsets   value(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   spliceu   s     c         C   s   t  |  | t d | ƒ ƒ Sd S(   s†   Writes the given unsigned short value into stream at the given
    offset and returns the resulting stream (the original is unchanged)s   >HN(   s   splices   streams   offsets   packs   value(   s   streams   offsets   value(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   _set_ushortz   s     (   s	   _rl_accelc         C   s   d t  |  ƒ d @Sd  S(   Ns   0X%8.8Xl   ÿÿ (   s   longs   i(   s   i(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   hex32‹   s    i  c         C   s   t  t |  ƒ | d @ƒ Sd S(   s   Calculate (x + y) modulo 2**32l   ÿÿ N(   s   _L2U32s   longs   xs   y(   s   xs   y(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   add32‘   s     c         C   s@   |  d @| d @} |  d ?| d ?| d ?} | d >| d @BSd S(   s   Calculate (x + y) modulo 2**32iÿÿ  i   N(   s   xs   ys   los   hi(   s   xs   ys   his   lo(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   add32•   s     c         C   sv   t  |  ƒ d @o  |  d t  |  ƒ d @d }  n d } x4 t d t  |  ƒ d ?|  ƒ D] } t | | ƒ } qU W| Sd S(   s   Calculates PDF-style checksumsi   i   s    i    s   >%dli   N(   s   lens   datas   sums   unpacks   ns   add32(   s   datas   sums   n(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   calcChecksumž   s        i   i    i   i   i   i   i   i   i   i	   i
   i   i   c         C   sÛ   d k  l } l } y | |  d ƒ } |  | f SWn¤ t j
 o˜ d k } | i i |  ƒ od d k	 l
 } xT | i D]E } | i i | |  ƒ } | | ƒ o | | d ƒ } | | f Squ qu Wn t d |  ƒ ‚ n Xd S(   sX   Opens a TTF file possibly after searching TTFSearchPath
    returns (filename,file)
    (   s	   rl_isfiles   open_for_reads   rbN(   s	   rl_configs   Can't open file "%s"(   s   reportlab.lib.utilss	   rl_isfiles   open_for_reads   fns   fs   IOErrors   oss   paths   isabss	   reportlabs	   rl_configs   TTFSearchPaths   Ds   joins   tfns   TTFError(   s   fns   open_for_reads   tfns   Ds   fs	   rl_isfiles	   rl_configs   os(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   TTFOpenFile¸   s      	
 s   TTFontParserc           B   sì   t  Z d  Z d d d f Z d d f Z d Z d d d „ Z d „  Z d	 „  Z d
 „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s   Basic TTF file parseri   ieurtifctti   s   TTFi    c         C   ss   | |  _  |  i | ƒ |  i ƒ  } | o |  i ƒ  |  i | ƒ n, |  i  o |  i	 ƒ  n |  i
 ƒ  d |  _ d S(   sá   Loads and parses a TrueType font file.  file can be a filename or a
        file object.  If validate is set to a false values, skips checksum
        validation.  This can save time, especially if the font is large.
        s    N(   s   validates   selfs   readFiles   files
   readHeaders   isCollections   readTTCHeaders
   getSubfonts   subfontIndexs   checksumFiles   readTableDirectorys   subfontNameX(   s   selfs   files   validates   subfontIndexs   isCollection(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__Ñ   s     	

 
c         C   s³   |  i ƒ  |  _ d |  _ |  i d  |  _ |  i |  i j o& t d |  i |  i |  i f ƒ ‚ n |  i ƒ  |  _ g  |  _	 |  i	 i
 } x' t |  i ƒ D] } | |  i ƒ  ƒ q• Wd  S(   Ns   TTCiÿÿÿÿs1   "%s" is not a %s file: can't read version 0x%8.8x(   s   selfs
   read_ulongs
   ttcVersions   fileKinds   ttfVersionss   ttcVersionss   TTFErrors   filenames   numSubfontss   subfontOffsetss   appends   as   xranges   i(   s   selfs   as   i(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   readTTCHeaderá   s    	&	 c         C   s²   |  i d j o  t d |  i |  i f ƒ ‚ n y |  i | } Wn6 t j
 o* t d |  i | |  i d f ƒ ‚ n X|  i	 | ƒ |  i
 ƒ  |  i ƒ  d t | ƒ |  _ d  S(   Ns   TTCs'   "%s" is not a TTC file: use this methods0   TTC file "%s": bad subfontIndex %s not in [0,%d]i   s   -(   s   selfs   fileKinds   TTFErrors   filenames   subfontOffsetss   subfontIndexs   poss
   IndexErrors   numSubfontss   seeks
   readHeaders   readTableDirectorys   strs   subfontNameX(   s   selfs   subfontIndexs   pos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   getSubfontí   s     (

c         C   s  yÓ |  i ƒ  |  _ |  i ƒ  |  _ |  i ƒ  |  _ |  i ƒ  |  _ h  |  _ g  |  _ x~ t |  i ƒ D]m } h  } |  i ƒ  | d <|  i ƒ  | d <|  i ƒ  | d <|  i ƒ  | d <|  i i | ƒ | |  i | d <qa WWn# t d |  i |  i f ƒ ‚ n X|  i o |  i ƒ  n d  S(   Ns   tags   checksums   offsets   lengths0   Corrupt %s file "%s" cannot read Table Directory(   s   selfs   read_ushorts	   numTabless   searchRanges   entrySelectors
   rangeShifts   tables   tabless   xranges   ns   records   read_tags
   read_ulongs   appends   TTFErrors   fileKinds   filenames   validates   checksumTables(   s   selfs   records   n(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   readTableDirectoryù   s(    		  
 c         C   s£   y |  i ƒ  |  _ } Wn# t d |  i |  i f ƒ ‚ n X| d j o  t d |  i |  i f ƒ ‚ n | |  i j o t d | ƒ ‚ n | |  i d j Sd S(   s,   read the sfnt header at the current positions)   "%s" is not a %s file: can't read versioniOTTOs3   %s file "%s": postscript outlines are not supporteds$   Not a TrueType font: version=0x%8.8XiÿÿÿÿN(   s   selfs
   read_ulongs   versions   TTFErrors   filenames   fileKinds   ttfVersions(   s   selfs   version(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   readHeader  s       c         C   sQ   t  | ƒ t j o t | ƒ \ |  _ } n
 d |  _ | i ƒ  |  _ d |  _ d  S(   Ns   (ttf)i    (	   s   types   files
   StringTypes   TTFOpenFiles   selfs   filenames   reads	   _ttf_datas   _pos(   s   selfs   file(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   readFile  s
    	c         C   s¼   xµ |  i D]ª } |  i | d | d ƒ } t | ƒ } | d d j o2 t d | d d d !ƒ d } t	 | | ƒ } n | d	 | j o* t
 d
 |  i t | ƒ | d f ƒ ‚ q
 q
 Wd  S(   Ns   offsets   lengths   tags   heads   >li   i   i    s   checksums,   TTF file "%s": invalid checksum %s table: %s(   s   selfs   tabless   ts	   get_chunks   tables   calcChecksums   checkSums   unpacks
   adjustments   add32s   TTFErrors   filenames   hex32(   s   selfs   checkSums   ts   tables
   adjustment(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   checksumTables&  s    
 c         C   so   t  |  i ƒ } t t d ƒ | ƒ d j o? t d |  i t | ƒ t	 |  i ƒ t	 |  i ƒ d @f ƒ ‚ n d  S(   Nl   º/ac i    s1   TTF file "%s": invalid checksum %s len: %d &3: %di   (
   s   calcChecksums   selfs	   _ttf_datas   checkSums   add32s   _L2U32s   TTFErrors   filenames   hex32s   len(   s   selfs   checkSum(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   checksumFile1  s    c         C   s0   |  i | d } |  i | d } | | f Sd S(   s1   Returns the offset and size of a given TTF table.s   offsets   lengthN(   s   selfs   tables   tags   offsets   length(   s   selfs   tags   lengths   offset(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   get_table_pos7  s     c         C   s   | |  _ d S(   s-   Moves read pointer to a given offset in file.N(   s   poss   selfs   _pos(   s   selfs   pos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   seek=  s     c         C   s   |  i | |  _ d S(   s   Skip the given number of bytes.N(   s   selfs   _poss   delta(   s   selfs   delta(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   skipA  s     c         C   s%   |  i | ƒ d | |  _ |  i Sd S(   s}   Moves read pointer to the given offset within a given table and
        returns absolute offset of that position in the file.i    N(   s   selfs   get_table_poss   tags   offset_in_tables   _pos(   s   selfs   tags   offset_in_table(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   seek_tableE  s     c         C   s+   |  i d 7_ |  i |  i d |  i !Sd S(   s   Read a 4-character tagi   N(   s   selfs   _poss	   _ttf_data(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   read_tagK  s     c         C   s8   |  i d 7_ t d |  i |  i d |  i !ƒ d Sd S(   s   Reads an unsigned shorti   s   >Hi    N(   s   selfs   _poss   unpacks	   _ttf_data(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   read_ushortP  s     c         C   s8   |  i d 7_ t d |  i |  i d |  i !ƒ d Sd S(   s   Reads an unsigned longi   s   >li    N(   s   selfs   _poss   unpacks	   _ttf_data(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   read_ulongU  s     c         C   s8   |  i d 7_ t d |  i |  i d |  i !ƒ d Sd S(   s   Reads a signed shorti   s   >hi    N(   s   selfs   _poss   unpacks	   _ttf_data(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   read_shortZ  s     c         C   s#   t  d |  i | | d !ƒ d Sd S(   s*   Return an unsigned short at given positions   >Hi   i    N(   s   unpacks   selfs	   _ttf_datas   pos(   s   selfs   pos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   get_ushort_  s     c         C   s#   t  d |  i | | d !ƒ d Sd S(   s)   Return an unsigned long at given positions   >li   i    N(   s   unpacks   selfs	   _ttf_datas   pos(   s   selfs   pos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys	   get_ulongc  s     c         C   s   |  i | | | !Sd S(   s,   Return a chunk of raw data at given positionN(   s   selfs	   _ttf_datas   poss   length(   s   selfs   poss   length(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys	   get_chunkg  s     c         C   s+   |  i | ƒ \ } } |  i | | | !Sd S(   s   Return the given TTF tableN(   s   selfs   get_table_poss   tags   poss   lengths	   _ttf_data(   s   selfs   tags   lengths   pos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys	   get_tablek  s     (   s   __name__s
   __module__s   __doc__s   ttfVersionss   ttcVersionss   fileKinds   __init__s   readTTCHeaders
   getSubfonts   readTableDirectorys
   readHeaders   readFiles   checksumTabless   checksumFiles   get_table_poss   seeks   skips
   seek_tables   read_tags   read_ushorts
   read_ulongs
   read_shorts
   get_ushorts	   get_ulongs	   get_chunks	   get_table(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   TTFontParserË   s0    																		s   TTFontMakerc           B   s)   t  Z d  Z d „  Z d „  Z d „  Z RS(   s   Basic TTF file generatorc         C   s   h  |  _ d S(   s   Initializes the generator.N(   s   selfs   tables(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__s  s     c         C   s4   | d j o t | d d ƒ } n | |  i | <d S(   s   Adds a table to the TTF file.s   headi   s       N(   s   tags   splices   datas   selfs   tables(   s   selfs   tags   data(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   addw  s     c         C   sÒ  t  ƒ  } t |  i ƒ } d } d } x* | d | j o | d } | d } q' W| d } | d | }	 | i	 t
 d d | | | |	 ƒ ƒ |  i i ƒ  } | i ƒ  d | d } x„ | D]| \ } } | d j o
 | } n t | ƒ }
 | i	 | ƒ | i	 t
 d	 |
 | t | ƒ ƒ ƒ t | ƒ d
 d @} | | } q¹ Wx9 | D]1 \ } } | d } | i	 | t | ƒ d @ ƒ q@Wt | i ƒ  ƒ }
 t t d ƒ |
 ƒ }
 | i | d ƒ | i	 t
 d |
 ƒ ƒ | i ƒ  Sd S(   s<   Finishes the generation and returns the TTF file as a stringi   i    i   i   s   >lHHHHi   i   s   heads   >LLLi   iüÿÿÿs      l   º/ac i   s   >LN(   s   StringIOs   stms   lens   selfs   tabless	   numTabless   searchRanges   entrySelectors
   rangeShifts   writes   packs   itemss   sorts   offsets   tags   datas
   head_starts   calcChecksums   checksums   paddedLengths   getvalues   add32s   _L2U32s   seek(   s   selfs   searchRanges   tabless   stms   offsets   paddedLengths   tags
   head_starts   entrySelectors
   rangeShifts   checksums   datas	   numTables(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   makeStream}  sD     	 


 
" 
(   s   __name__s
   __module__s   __doc__s   __init__s   adds
   makeStream(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   TTFontMakerp  s    		s
   TTFontFilec           B   s5   t  Z d  Z d d d d „ Z d d „ Z d „  Z RS(   s   TTF file parser and generatori   i    c         C   s-   t  i |  | d | d | ƒ|  i | ƒ d S(   s  Loads and parses a TrueType font file.

        file can be a filename or a file object.  If validate is set to a false
        values, skips checksum validation.  This can save time, especially if
        the font is large.  See TTFontFile.extractInfo for more information.
        s   validates   subfontIndexN(   s   TTFontParsers   __init__s   selfs   files   validates   subfontIndexs   extractInfos   charInfo(   s   selfs   files   charInfos   validates   subfontIndex(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__ª  s     c   ?      C   sA  |  i d ƒ }1 |  i ƒ  }$ |$ d j o t d |$ ‚ n |  i ƒ  } |1 |  i ƒ  } h  d t <d t <d t <d t <d t <} | i
 ƒ  }& t | ƒ }	 xÐt | ƒ D]Â}6 |  i ƒ  } |  i ƒ  } |  i ƒ  } |  i ƒ  } |  i ƒ  }; |  i ƒ  }. | |& j o q­ n t }( | d j o | d j o
 | d	 j o° |  i }> z– |  i | |. ƒ |; d d j o t d
 ‚ n |; d :}; g  }( |( i }! x8 |; d j o* |  i ƒ  }
 |! t |
 ƒ ƒ |; d 8}; q“Wd i |( ƒ }( Wd |> |  _ XnB | d j o | d j o
 | d j o |  i | |. |; ƒ }( n |( o | | t j o* |( | | <|	 d 8}	 |	 d j o Pqoq­ q­ W| d }) |) o t d ‚ n x| |) D]t }3 t" |3 ƒ } | d j  p5 | d j p( |3 d d d d d d d d d d f
 j o t d |3 t" |3 ƒ f ‚ q™q™W|) |  _$ | d p |) |  _% | d p d |  _& | d p |) |  _' | d p |) |  _( |  i d ƒ |  i ƒ  |  i ƒ  f \ }5 } |5 d j o t d |5 | f ‚ n |  i+ d ƒ |  i, ƒ  }4 |4 d j o t d  |4 ‚ n |  i+ d ƒ |  i ƒ  }8 |8 d! „ } |  i+ d" ƒ |  i0 ƒ  } |  i0 ƒ  }  |  i0 ƒ  } |  i0 ƒ  }# t5 | | |  | |# g ƒ |  _6 |  i+ d d ƒ |  i ƒ  }' |  i ƒ  }2 |  i9 i: d# ƒ o|  i d# ƒ |  i ƒ  } |  i+ d ƒ |  i ƒ  } |  i+ d ƒ |  i ƒ  } | d j p | d$ @d j o t d% | ‚ n |  i+ d& ƒ |  i0 ƒ  } |  i0 ƒ  } | | ƒ |  _@ | | ƒ |  _A | d j o, |  i+ d" ƒ |  i0 ƒ  }+ | |+ ƒ |  _C qâ|  i@ |  _C n1 d' } | |# ƒ |  _@ | |  ƒ |  _A |  i@ |  _C d( tD | d) d ƒ |  _E |  i d* ƒ |  i ƒ  |  i ƒ  f \ }5 } |5 d d d d f j o t d+ |5 | f ‚ n |  i0 ƒ  |  i ƒ  d, |  _F |  i+ d ƒ |  i, ƒ  }% tH |  _I |  iF d j o |  iI tJ B|  _I n | d- j o |  iI tK B|  _I n |% o |  iI tL B|  _I n |  i d. ƒ |  i ƒ  |  i ƒ  f \ }5 } |5 d j o t d/ |5 | f ‚ n |  i+ d0 ƒ |  i ƒ  } | d j o t d1 | ‚ n |  i ƒ  } | d j o t d2 ‚ n |  i d3 ƒ |  i ƒ  |  i ƒ  f \ }5 } |5 d j o t d4 |5 | f ‚ n |  i ƒ  }" | o# t |  _Q t |  _R t |  _S d Sn |2 d j o t d5 |2 ‚ n |  i d6 ƒ } |  i+ d ƒ |  i ƒ  }0 t }= xÅ t |0 ƒ D]· }9 |  i ƒ  }: |  i ƒ  } |  i, ƒ  }. |: d j o
 | d j o3 |  iZ | |. ƒ }$ |$ d j o | |. }= Pq9	q‚|: d j o3 |  iZ | |. ƒ }$ |$ d j o | |. }= Pq9	q‚q‚W|= t j o t d7 ‚ n |  i |= d ƒ |  i ƒ  }; |= |; }< |  i+ d ƒ |  i ƒ  d }/ |  i+ d ƒ t5 |  d8 „ t |/ ƒ ƒ } |  i+ d ƒ t5 |  d8 „ t |/ ƒ ƒ } t5 |  d9 „ t |/ ƒ ƒ } |  i } t5 |  d8 „ t |/ ƒ ƒ } h  } h  }7 xt |/ ƒ D]}9 xû t | |9 | |9 d ƒ D]Þ }* | |9 d j o |* | |9 d: @}, nv |* | |9 d | |9 }. | d |9 |. }. |. |< j o
 d }, n3 |  iZ |. ƒ }, |, d j o |, | |9 d: @}, n |, |7 |* <| i: |, ƒ o | |, i |* ƒ qe
|* g | |, <qe
WqC
W|7 |  _Q |  i d; ƒ t } h  |  _S g  |  _f x¤ t | ƒ D]– }, |  i ƒ  |  i ƒ  f \ } }- |  if i | |- f ƒ | | ƒ } |, d j o | |  _R n | i: |, ƒ o& x# | |, D] }
 | |  iS |
 <qWq†q†Wxo t | |" ƒ D]^ }, |  i ƒ  }- |  if i | |- f ƒ | i: |, ƒ o& x# | |, D] }
 | |  iS |
 <qsWq0q0W|  i d< ƒ g  |  _h |' d j o9 x… t |" d ƒ D]  }9 |  ih i |  i ƒ  d >ƒ qÆWnP |' d j o5 x? t |" d ƒ D] }9 |  ih i |  i, ƒ  ƒ qWn t d= |' ‚ d S(>   sH  Extract typographic information from the loaded font file.

        The following attributes will be set:
            name         - PostScript font name
            flags        - Font flags
            ascent       - Typographic ascender in 1/1000ths of a point
            descent      - Typographic descender in 1/1000ths of a point
            capHeight    - Cap height in 1/1000ths of a point (0 if not available)
            bbox         - Glyph bounding box [l,t,r,b] in 1/1000ths of a point
            italicAngle  - Italic angle in degrees ccw
            stemV        - stem weight in 1/1000ths of a point (approximate)
        If charInfo is true, the following will also be set:
            defaultWidth - default glyph width in 1/1000ths of a point
            charWidths   - dictionary of character widths for every supported
                           UCS character code

        This will only work if the font has a Unicode cmap (platform 3,
        encoding 1, format 4 or platform 0 any encoding format 4).  Setting
        charInfo to false avoids this requirement.
        s   namei    s   Unknown name table format (%d)i   i   i   i   i   i	  s0   PostScript name is UTF-16BE string of odd lengths    Ns#   Could not find PostScript font namei!   i~   s   [s   ]s   (s   )s   {s   }s   <s   >s   /s   %s0   psName contains invalid character '%s' ie U+%04Xs   Regulars   heads"   Unknown head table version %d.%04xi   iõ<_s   Invalid head table magic %04xc         C   s   |  d | S(   Niè  (   s   xs
   unitsPerEm(   s   xs
   unitsPerEm(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   <lambda>  s    i   s   OS/2i   s/   Font does not allow subsetting/embedding (%04X)i:   iô  i2   f65.0s   posts"   Unknown post table version %d.%04xf65536.0iX  s   hheas"   Unknown hhea table version %d.%04xi   s*   Unknown horizontal metric data format (%d)s!   Number of horizontal metrics is 0s   maxps"   Unknown maxp table version %d.%04xs   Unknown glyph data format (%d)s   cmapsj   Font does not have cmap for Unicode (platform 3, encoding 1, format 4 or platform 0 any encoding format 4)c         C   s
   | i ƒ  S(   N(   s   selfs   read_ushort(   s   xs   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   <lambda>Œ  s    c         C   s
   | i ƒ  S(   N(   s   selfs
   read_short(   s   xs   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   <lambda>  s    iÿÿ  s   hmtxs   locas"   Unknown location table format (%d)(i   s   selfs
   seek_tables   name_offsets   read_ushorts   formats   TTFErrors
   numRecordss   string_data_offsets   Nones   namess   keyss   Ks   lens	   nameCounts   xranges   is
   platformIds
   encodingIds
   languageIds   nameIds   lengths   offsets   Ns   _poss   oposs   seeks   appends   As   chars   chrs   joins	   get_chunks   psNames   cs   ords   ocs   names
   familyNames	   styleNames   fullNames   uniqueFontIDs   ver_majs   ver_mins   skips
   read_ulongs   magics
   unitsPerEms   scales
   read_shorts   xMins   yMins   xMaxs   yMaxs   maps   bboxs   indexToLocFormats   glyphDataFormats   tables   has_keys   versions   usWeightClasss   fsTypes   sTypoAscenders   sTypoDescenders   ascents   descents
   sCapHeights	   capHeights   ints   stemVs   italicAngles   isFixedPitchs   FF_SYMBOLICs   flagss	   FF_ITALICs   FF_FORCEBOLDs   FF_FIXEDs   metricDataFormats   numberOfHMetricss	   numGlyphss   charInfos   charToGlyphs   defaultWidths
   charWidthss   cmap_offsets   cmapTableCounts   unicode_cmap_offsets   ns
   platformIDs
   encodingIDs
   get_ushorts   limits   segCounts   endCounts
   startCounts   idDeltas   idRangeOffset_starts   idRangeOffsets   glyphToChars   unichars   glyphs   aws   hmetricss   lsbs   glyphPos(?   s   selfs   charInfos
   encodingIds   numberOfHMetricss   xMaxs   sTypoDescenders   idRangeOffset_starts
   platformIds
   numRecordss	   nameCounts   chars   glyphToChars   namess   string_data_offsets   ver_mins   sTypoAscenders   nameIds   metricDataFormats
   encodingIDs   scales   ocs
   languageIds   cmap_offsets   usWeightClasss
   startCounts   idRangeOffsets   fsTypes   versions   idDeltas   aws   xMins   endCounts   yMins   As	   numGlyphss   yMaxs   formats   isFixedPitchs   Ks   indexToLocFormats   Ns   psNames   unichars
   sCapHeights   glyphs   lsbs   offsets   segCounts   cmapTableCounts   name_offsets   glyphDataFormats   cs   magics   ver_majs   is   charToGlyphs
   unitsPerEms   ns
   platformIDs   lengths   limits   unicode_cmap_offsets   opos(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   extractInfo´  sÄ    3  '	
	  '

 
 E!					 
	

	  

			    	 " c   &      C   sš  t  ƒ  }% d g } h  d d <} h  }# xx | D]p } |  i i	 | ƒ o |  i | } n d } | i	 | ƒ o! t | ƒ | | <| i | ƒ n | | |# | <q. W|  i d ƒ d } d } xi| t | ƒ j  oU| | } |  i | }
 |  i | d |
 } |  i | |
 ƒ |  i ƒ  } | d j  oñ |  i d ƒ t }" xÛ |" t @oË |  i ƒ  }" |  i ƒ  }	 | i	 |	 ƒ o! t | ƒ | |	 <| i |	 ƒ n |" t @o |  i d ƒ n |  i d ƒ |" t @o |  i d ƒ q=|" t @o |  i d ƒ q=|" t @o |  i d ƒ q=q=Wn | d } q¾ Wt | ƒ } } xC | d j o$ |  i | d |  i | d d j o | d } q:W| } xP d d d	 d
 d f D]9 }! y |% i" |! |  i# |! ƒ ƒ Wq™t$ j
 o q™Xq™Wd |  i# d ƒ d d !d d } |% i" d | ƒ |  i# d ƒ } t' | d | ƒ } |% i" d | ƒ |  i# d ƒ } t' | d | ƒ } |% i" d | ƒ t | ƒ } d | d }  d d d d d d d |  d d | g t+ |# i, | ƒ } t. t/ d t | ƒ g | ƒ } |% i" d | ƒ g  } x\ t1 | ƒ D]N } | | } |  i | \ } } | | j  o | i | ƒ n | i | ƒ qþWt. t/ d t | ƒ g | ƒ } |% i" d | ƒ |  i# d ƒ }$ g  } g  } d } xÓt1 | ƒ D]Å} | i | ƒ | | } |  i | }
 |  i | d |
 } |$ |
 |
 | !} | d j o t9 d | d  ƒ d d j  oõ d } t }" xæ |" t @oÖ t9 d | | | d !ƒ d }" t9 d | | d | d !ƒ d }	 t' | | d | |	 ƒ } | d } |" t @o | d } n | d } |" t @o | d } q8|" t @o | d } q8|" t @o | d } q8q8Wn | i | ƒ | | } | d d j o- d | d } | i d | ƒ | | } q®q®W| i | ƒ |% i" d t< i= | d ƒ ƒ g  } | d d ?d j oH d } x | D] } | i | ƒ qÈWt. t/ d t | ƒ g | ƒ } nI d } x | D] } | i | d ?ƒ qWt. t/ d t | ƒ g | ƒ } |% i" d | ƒ |  i# d ƒ } t' | d  | ƒ } |% i" d | ƒ |% iB ƒ  Sd! S("   s"   Create a subset of a TrueType fonti    s   glyfi   i   i   i   s   names   OS/2s   cvt s   fpgms   preps      s   posti   s    s   hheai"   s   maxpi
   i   i   s   >%dHs   cmaps   hmtxs   >hs   >Hs    iÿÿ  s   >%dLs   locas   headi2   N(C   s   TTFontMakers   outputs   glyphMaps   glyphSets   codeToGlyphs   subsets   codes   selfs   charToGlyphs   has_keys   originalGlyphIdxs   lens   appends   get_table_poss   starts   ns   glyphPoss   glyphLens   seeks
   read_shorts   numberOfContourss   skips   GF_MORE_COMPONENTSs   flagss   read_ushorts   glyphIdxs   GF_ARG_1_AND_2_ARE_WORDSs   GF_WE_HAVE_A_SCALEs   GF_WE_HAVE_AN_X_AND_Y_SCALEs   GF_WE_HAVE_A_TWO_BY_TWOs	   numGlyphss   hmetricss   numberOfHMetricss   tags   adds	   get_tables   KeyErrors   posts   hheas   _set_ushorts   maxps
   entryCounts   lengths   maps   gets   cmaps   applys   packs   hmtxs   xranges   aws   lsbs	   glyphDatas   offsetss   glyfs   poss   datas   unpacks   pos_in_glyphs   paddings   strings   joins   locas   indexToLocFormats   offsets   heads
   makeStream(&   s   selfs   subsets   glyphMaps   codes   lsbs   glyphLens   numberOfHMetricss   aws   hheas   glyphIdxs   glyphPoss   datas   locas   starts
   entryCounts   glyfs   cmaps   numberOfContourss   heads	   numGlyphss   offsetss   originalGlyphIdxs   poss   paddings   glyphSets   offsets   posts   hmtxs   pos_in_glyphs   maxps   indexToLocFormats   ns   lengths   tags   flagss   codeToGlyphs	   glyphDatas   output(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   makeSubsetÓ  s    		  
  4 	"7  
  
+ "


 $  (   s   __name__s
   __module__s   __doc__s   __init__s   extractInfos
   makeSubset(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   TTFontFile§  s
    
ÿ  i   i   i   s
   TTFontFacec           B   s/   t  Z d  Z d d d „ Z d „  Z d „  Z RS(   s˜   TrueType typeface.

    Conceptually similar to a single byte typeface, but the glyphs are
    identified by UCS character codes instead of glyph names.i    c         C   s3   t  i i |  t ƒ t i |  | d | d | ƒd S(   s$   Loads a TrueType font from filename.s   validates   subfontIndexN(	   s
   pdfmetricss   TypeFaces   __init__s   selfs   Nones
   TTFontFiles   filenames   validates   subfontIndex(   s   selfs   filenames   validates   subfontIndex(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__  s     c         C   s   |  i i | |  i ƒ Sd S(   s'   Returns the width of character U+<code>N(   s   selfs
   charWidthss   gets   codes   defaultWidth(   s   selfs   code(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   getCharWidth•  s     c         C   s-  t  i ƒ  } |  i | ƒ | _ t | i ƒ | i d <| i
 o t  i g | _ n | i | d |  i | f ƒ } |  i t @} | t B} t  i h  d d <d |  i <d |  i <d |  i <d | <d	 t  i |  i ƒ <d
 t  i | ƒ <d |  i <d |  i <d | <ƒ } | i | d | ƒ Sd S(   s€   Generate a TrueType font subset and add it to the PDF document.
        Returns a PDFReference to the new FontDescriptor object.s   Length1s   fontFile:%s(%s)s   Types   /FontDescriptors   Ascents	   CapHeights   Descents   Flagss   FontBBoxs   FontNames   ItalicAngles   StemVs	   FontFile2s   fontDescriptor:N(   s   pdfdocs	   PDFStreams   fontFiles   selfs
   makeSubsets   subsets   contents   lens
   dictionarys   docs   compressions   PDFZCompresss   filterss	   References   filenames   fontnames   fontFileRefs   flagss   FF_NONSYMBOLICs   FF_SYMBOLICs   PDFDictionarys   ascents	   capHeights   descents   PDFArrays   bboxs   PDFNames   italicAngles   stemVs   fontDescriptor(   s   selfs   docs   fontnames   subsets   fontFiles   fontDescriptors   flagss   fontFileRef(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   addSubsetObjects™  s     

(   s   __name__s
   __module__s   __doc__s   __init__s   getCharWidths   addSubsetObjects(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   TTFontFaceŠ  s    	s
   TTEncodingc           B   s   t  Z d  Z d „  Z RS(   sï   Encoding for TrueType fonts (always UTF-8).

    TTEncoding does not directly participate in PDF object creation, since
    we need a number of different 8-bit encodings for every generated font
    subset.  TTFont itself cares about that.c         C   s   d |  _ d  S(   Ns   UTF-8(   s   selfs   name(   s   self(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__¼  s    (   s   __name__s
   __module__s   __doc__s   __init__(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   TTEncodingµ  s    s   TTFontc           B   s`   t  Z d  Z d f  d „  ƒ  YZ d d d „ Z d d „ Z e Z d d „ Z d „  Z d	 „  Z	 RS(
   s›  Represents a TrueType font.

    Its encoding is always UTF-8.

    Note: you cannot use the same TTFont object for different documents
    at the same time.

    Example of usage:

        font = ttfonts.TTFont('PostScriptFontName', '/path/to/font.ttf')
        pdfmetrics.registerFont(font)

        canvas.setFont('PostScriptFontName', size)
        canvas.drawString(x, y, "Some text encoded in UTF-8")
    s   Statec           B   s   t  Z d „  Z RS(   Nc         C   sg   h  |  _ d |  _ t |  _ d |  _ t d ƒ } | g |  _ x | D] } | |  i | <qC Wd |  _ d  S(   Ni    i€   (
   s   selfs   assignmentss   nextCodes   Nones   internalNames   frozens   ranges   subset0s   subsetss   n(   s   selfs   ns   subset0(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__Ò  s    				 (   s   __name__s
   __module__s   __init__(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   StateÑ  s   i    c         C   sO   | |  _ t | d | d | ƒ|  _ t ƒ  |  _	 d |  _
 d |  _ h  |  _ d S(   sµ   Loads a TrueType font from filename.

        If validate is set to a false values, skips checksum validation.  This
        can save time, especially if the font is large.
        s   validates   subfontIndexi   N(   s   names   selfs   fontNames
   TTFontFaces   filenames   validates   subfontIndexs   faces
   TTEncodings   encodings
   _multiBytes   _dynamicFonts   state(   s   selfs   names   filenames   validates   subfontIndex(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   __init__á  s     			s   utf-8c         C   sŽ   t  | ƒ t j	 o t | | p d ƒ } n |  i i i } |  i i
 } d | t g  i } | D] } | | t | ƒ | ƒ ƒ q` ~ ƒ Sd S(   s   Calculate text widths   utf-8f0.001N(   s   types   texts   UnicodeTypes   unicodes   encodings   selfs   faces
   charWidthss   gets   gs   defaultWidths   dws   sizes   sums   appends   _[1]s   us   ord(   s   selfs   texts   sizes   encodings   gs   _[1]s   us   dw(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   _py_stringWidthî  s     c   
      C   s-  y |  i | } Wn* t j
 o t i ƒ  } |  i | <n Xd } g  } g  } t	 | ƒ t j	 o t | | p d ƒ } n xrt t | ƒ D]a} | i i | ƒ o | i | }	 nÏ | i o t i d |  i | f ‚ n | i }	 |	 d @d j o4 | i |	 d ?i d ƒ | i d 7_ | i }	 n | i d 7_ |	 | i | <|	 d @d j o | i i g  ƒ n | i |	 d ?i | ƒ |	 d ?| j oG | o, | i | t i t t | ƒ d	 ƒ f ƒ n |	 d ?} g  } n | i |	 d @ƒ q W| o, | i | t i t t | ƒ d	 ƒ f ƒ n | Sd
 S(   s   Splits text into a number of chunks, each of which belongs to a
        single subset.  Returns a list of tuples (subset, string).  Use subset
        numbers with getSubsetInternalName.  Doc is needed for distinguishing
        subsets when building different documents at the same time.iÿÿÿÿs   utf-8s:   Font %s is already frozen, cannot add new character U+%04Xiÿ   i    i   i   i    s    N(   s   selfs   states   docs   KeyErrors   TTFonts   States   curSets   curs   resultss   types   texts   UnicodeTypes   unicodes   encodings   maps   ords   codes   assignmentss   has_keys   ns   frozens   pdfdocs   PDFErrors   fontNames   nextCodes   subsetss   appends   strings   joins   chr(
   s   selfs   texts   docs   encodings   curSets   codes   curs   resultss   states   n(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   splitString÷  sF        
	,

,c         C   så   y |  i | } Wn* t j
 o t i ƒ  } |  i | <n X| d j  p | t | i ƒ j o t	 d | |  i
 f ‚ n | i t j oE d t | i ƒ d | _ d | i | i |  i
 <| i i |  ƒ n d | i | f Sd S(   sª   Returns the name of a PDF Font object corresponding to a given
        subset of this dynamic font.  Use this function instead of
        PDFDocument.getInternalFontName.i    s#   Subset %d does not exist in font %ss   F%di   s   /s   /%s+%dN(   s   selfs   states   docs   KeyErrors   TTFonts   States   subsets   lens   subsetss
   IndexErrors   fontNames   internalNames   Nones   fontMappings   delayedFontss   append(   s   selfs   subsets   docs   state(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   getSubsetInternalName  s       #c         C   sÏ  y |  i | } Wn* t j
 o t i ƒ  } |  i | <n Xd | _ xwt t | i	 ƒ ƒ D]`} | i	 | } |  i | | ƒ d } d t | ƒ |  i i |  i i f }	 t i ƒ  } d |  i | f | _ | | _ |	 | _ d | _ t | ƒ d | _ t |  i i | ƒ } t i | ƒ | _  t i! ƒ  } t# |	 | ƒ | _$ | i% o t i& g | _' n | i( | d |	 ƒ | _) |  i i* | |	 | ƒ | _+ | i( | | ƒ }
 | i- d i. } | | | <q] W|  i | =d S(   sZ  Makes  one or more PDF objects to be added to the document.  The
        caller supplies the internal name to be used (typically F1, F2, ... in
        sequence).

        This method creates a number of Font and FontDescriptor objects.  Every
        FontDescriptor is a (no more than) 256 character subset of the original
        TrueType font.i   s   %s+%s%ss   Font %s subset %di    s   toUnicodeCMap:s
   BasicFontsN(0   s   selfs   states   docs   KeyErrors   TTFonts   States   frozens   xranges   lens   subsetss   ns   subsets   getSubsetInternalNames   internalNames   SUBSETNs   faces   names   subfontNameXs   baseFontNames   pdfdocs   PDFTrueTypeFonts   pdfFonts   fontNames   __Comment__s   Names   BaseFonts	   FirstChars   LastChars   maps   getCharWidths   widthss   PDFArrays   Widthss	   PDFStreams
   cmapStreams   makeToUnicodeCMaps   contents   compressions   PDFZCompresss   filterss	   References	   ToUnicodes   addSubsetObjectss   FontDescriptors   refs
   idToObjects   dicts   fontDict(   s   selfs   docs   subsets   internalNames
   cmapStreams   widthss   ns   states   fontDicts   baseFontNames   refs   pdfFont(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys
   addObjects,  s:       	 %			
(
   s   __name__s
   __module__s   __doc__s   States   __init__s   _py_stringWidths   stringWidths   splitStrings   getSubsetInternalNames
   addObjects(    (    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   TTFontÀ  s    '	(   s   _instanceStringWidthTTF(H   s   __doc__s   __version__s   strings   typess
   StringTypes   UnicodeTypes   structs   packs   unpacks	   cStringIOs   StringIOs   reportlab.pdfbases
   pdfmetricss   pdfdocs   _L2U32s   PDFErrors   TTFErrors	   maketranss   SUBSETNs   codecss   utf_8_encodes   utf_8_decodes   latin_1_decodes
   parse_utf8s   parse_latin1s   latin1_to_utf8s   makeToUnicodeCMaps   splices   _set_ushorts   syss	   _rl_accels   ImportErrors   reportlab.libs   Nones   hex32s   add32s
   hexversions   calcChecksums   GF_ARG_1_AND_2_ARE_WORDSs   GF_ARGS_ARE_XY_VALUESs   GF_ROUND_XY_TO_GRIDs   GF_WE_HAVE_A_SCALEs   GF_RESERVEDs   GF_MORE_COMPONENTSs   GF_WE_HAVE_AN_X_AND_Y_SCALEs   GF_WE_HAVE_A_TWO_BY_TWOs   GF_WE_HAVE_INSTRUCTIONSs   GF_USE_MY_METRICSs   GF_OVERLAP_COMPOUNDs   GF_SCALED_COMPONENT_OFFSETs   GF_UNSCALED_COMPONENT_OFFSETs   TTFOpenFiles   TTFontParsers   TTFontMakers
   TTFontFiles   FF_FIXEDs   FF_SERIFs   FF_SYMBOLICs	   FF_SCRIPTs   FF_NONSYMBOLICs	   FF_ITALICs	   FF_ALLCAPs   FF_SMALLCAPs   FF_FORCEBOLDs   TypeFaces
   TTFontFaces
   TTEncodings   TTFonts   _instanceStringWidthTTFs   news   instancemethods   stringWidth(9   s   calcChecksums   FF_SYMBOLICs   TTFonts   add32s	   FF_ITALICs   parse_latin1s   makeToUnicodeCMaps	   FF_ALLCAPs   FF_SMALLCAPs   _instanceStringWidthTTFs   FF_FORCEBOLDs   utf_8_decodes   GF_UNSCALED_COMPONENT_OFFSETs   TTFOpenFiles   FF_SERIFs
   StringTypes   latin_1_decodes   FF_FIXEDs   GF_SCALED_COMPONENT_OFFSETs   GF_WE_HAVE_A_TWO_BY_TWOs   GF_MORE_COMPONENTSs   GF_USE_MY_METRICSs   GF_WE_HAVE_A_SCALEs   GF_ROUND_XY_TO_GRIDs   news   GF_OVERLAP_COMPOUNDs   latin1_to_utf8s   GF_WE_HAVE_AN_X_AND_Y_SCALEs
   TTFontFiles   strings   TTFontMakers   GF_RESERVEDs	   FF_SCRIPTs   hex32s   syss   _set_ushorts
   pdfmetricss   GF_WE_HAVE_INSTRUCTIONSs   splices
   parse_utf8s   SUBSETNs   unpacks   GF_ARG_1_AND_2_ARE_WORDSs   TTFontParsers   __version__s   GF_ARGS_ARE_XY_VALUESs	   _rl_accels   StringIOs   FF_NONSYMBOLICs   _L2U32s   TTFErrors
   TTFontFaces   UnicodeTypes   utf_8_encodes   pdfdocs
   TTEncodings   pack(    (    sC   /home/packages/reportlab/reportlab_2_0/reportlab/pdfbase/ttfonts.pys   ?:   s–   							












	¥7ÿ Ú+”	