Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 Nebã@s6dZddlmZddlmZdd„Zedkr2eƒdS)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 CsÜg}|jdƒx¢tjƒD]–\}\}}td|||fƒt|ƒ}|jj}|jj}i}x4|jƒD](\}} |j | dƒ} | dkr\| |t |ƒ<q\Wtdt |ƒƒ|jd|t |ƒfƒqWdj |ƒd} tddƒj| ƒtd ƒdS) NzwidthsByUnichar = {}zhandling %s : %s : %sièz$created font width map (%d items). zwidthsByUnichar["%s"] = %sÚ zcanned_widths.pyÚwzwrote canned_widths.py)ÚappendrÚitemsÚprintrZfaceZ_explicitWidthsÚencodingZ_cmapÚgetÚchrÚlenÚreprÚjoinÚopenÚwrite) ÚbufZfontNameÚlanguageZencNameZfontZ widthsByCIDZcmapZnonStandardWidthsByUnicharZ codePointZcidÚwidthÚsrc©rúA/tmp/tmp4i9tl1d3/lib64/python/reportlab/pdfbase/_can_cmap_data.pyÚruns"  rÚ__main__N)Ú__doc__Zreportlab.pdfbase._cidfontdatarZreportlab.pdfbase.cidfontsrrÚ__name__rrrrÚs