
    f j                     L    d Z ddlmZ ddlmZ d Zedk    r e             dS dS )uq  
This is a utility to 'can' the widths data for certain CID fonts.
Now we're using Unicode, we don't need 20 CMAP files for each Asian
language, nor the widths of the non-normal characters encoded in each
font.  we just want a dictionary of the character widths in a given
font which are NOT 1000 ems wide, keyed on Unicode character (not CID).

Running off CMAP files we get the following widths...::

    >>> font = UnicodeCIDFont('HeiseiMin-W3')
    >>> font.stringWidth(unicode(','), 10)
    2.5
    >>> font.stringWidth(unicode('m'), 10)
    7.7800000000000002
    >>> font.stringWidth(u'東京', 10)
    20.0
    >>> 

    )defaultUnicodeEncodings)UnicodeCIDFontc            	         g } |                      d           t          j                    D ]\  }\  }}t          d|d|d|           t	          |          }|j        j        }|j        j        }i }|                                D ]3\  }}	|	                    |	d          }
|
dk    r|
|t          |          <   4t          dt          |          z             |                      d|dt          |                     d                    |           dz   }t          d	d
                              |           t          d           d S )NzwidthsByUnichar = {}z	handling z : i  z$created font width map (%d items).  zwidthsByUnichar["z"] = 
zcanned_widths.pywzwrote canned_widths.py)appendr   itemsprintr   face_explicitWidthsencoding_cmapgetchrlenreprjoinopenwrite)buffontNamelanguageencNamefontwidthsByCIDcmapnonStandardWidthsByUnichar	codePointcidwidthsrcs               tC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\reportlab/pdfbase/_can_cmap_data.pyrunr#      sl   
CJJ%&&&)@)F)H)H ` `%%8W888WWEFFF h''i/}"%'""jjll 	C 	CNIsOOC..E} C=B*3y>>: 	4s;U7V7VVWWW


888TB\=]=]=]^____ ))C..4
C	C  &&s+++	
"#####    __main__N)__doc__reportlab.pdfbase._cidfontdatar   reportlab.pdfbase.cidfontsr   r#   __name__ r$   r"   <module>r+      sm    ( C B B B B B 5 5 5 5 5 5$ $ $< Z 
CEEEEE
 
r$   