?PNG  IHDR ? f ??C1 sRGB ?? gAMA ? a pHYs ? ??od GIDATx^LeY?a?("Bh?_????q5k?*:t0A-o??]VkJM??f?8\k2ll1]q????T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
6Jc @s*dZddkZddkZddkZddklZeZeZ e Z dZ dZ dZdZdZd Zd Zd Zd Zd ZdddYZedjo`dZxWeieD]BZeeiieeZeeZei d\Z!Z"qWndS(s This is a python interface to Adobe Font Metrics Files. Although a number of other python implementations exist (and may be more complete than mine) I decided not to go with them because either they were either 1) copyrighted or used a non-BSD compatible license 2) had too many dependencies and I wanted a free standing lib 3) Did more than I needed and it was easier to write my own than figure out how to just get what I needed from theirs It is pretty easy to use, and requires only built-in python libs:: >>> from afm import AFM >>> fh = file('ptmr8a.afm') >>> afm = AFM(fh) >>> afm.string_width_height('What the heck?') (6220.0, 683) >>> afm.get_fontname() 'Times-Roman' >>> afm.get_kern_dist('A', 'f') 0 >>> afm.get_kern_dist('A', 'y') -92.0 >>> afm.get_bbox_char('!') [130, -9, 238, 676] >>> afm.get_bbox_font() [-168, -218, 1000, 898] AUTHOR: John D. Hunter iN(t uni2type1cCs=|idd}g}|iD]}|t|q#~S(Nt,t (treplacetsplitt_to_int(tst_[1]tval((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_to_list_of_ints-scCs+g}|iD]}|t|q~S(N(Rt _to_float(RRR((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_to_list_of_floats1scCs&|iidjotStSdS(Ntfalset0tno(R R R(tlowertstriptFalsetTrue(R((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_to_bool3scCsT|i}z|i}Wd|i|dX|idptdndS(s[ Check if the file at least looks like AFM. If not, raise :exc:`RuntimeError`. NitStartFontMetricssNot an AFM file(ttelltreadlinetseekt startswitht RuntimeError(tfhtpostline((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt _sanity_check8s  cCshtd6td6td6td6td6td6td6td6td 6td 6td 6td 6td 6td6td6td6td6td6td6td6td6td6td6}h}x|i}|pPn|i}|idoqn|idd}|d}t |djo|d}nd}y|||||False * '0'->0 * '-168 -218 1000 898'-> [-168, -218, 1000, 898] Dictionary keys are StartFontMetrics, FontName, FullName, FamilyName, Weight, ItalicAngle, IsFixedPitch, FontBBox, UnderlinePosition, UnderlineThickness, Version, Notice, EncodingScheme, CapHeight, XHeight, Ascender, Descender, StartCharMetrics RtFontNametFullNamet FamilyNametWeightt ItalicAnglet IsFixedPitchtFontBBoxtUnderlinePositiontUnderlineThicknesstVersiontNoticetEncodingSchemet CapHeightt CapheighttXHeighttAscendert DescendertStdHWtStdVWtStartCharMetricst CharacterSett CharacterstCommentRiiits"Value error parsing header in AFM:s/Found an unknown keyword in AFM header (was %s)s Bad parseN(R t_to_strRR RRtrstripRRtlent ValueErrortsyststderrtKeyErrorR(RtheaderConverterstdRtlsttkeyR((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt _parse_headerMs`     c CsQh}h}x2|i}|pPn|i}|ido ||fS|idd }t|djotd|nt|did}t|did}|did}t|dd}t t |}|d jo d }n|d jo|||f||RItc1tc2R((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_parse_kern_pairss(     $&c Csh}x|i}|pPn|i}t|djoq n|ido|S|id}|di}|dt|d}}g}xc|dd!D]T}|i} | dt| dt| d}} } |i|| | fqW|||RRItccRLtnumPartstpccPartsRtpcctdxtdy((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_parse_compositess*   , cCshtd6td6}hhd6hd6}xv|i}|pPn|i}t|djoq+n|id}||jo|||||RR@tl((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt_parse_optionals     cCsOt|t|}t|\}}t|}||||d|dfS(s Parse the Adobe Font Metics file in file handle *fh*. Return value is a (*dhead*, *dcmetrics*, *dkernpairs*, *dcomposite*) tuple where *dhead* is a :func:`_parse_header` dict, *dcmetrics* is a :func:`_parse_composites` dict, *dkernpairs* is a :func:`_parse_kern_pairs` dict (possibly {}), and *dcomposite* is a :func:`_parse_composites` dict (possibly {}) ii(RRARNRb(Rtdheadtdcmetrics_asciitdcmetrics_namet doptional((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt parse_afms   tAFMcBseZdZedZdZdZdZedZedZ dZ edZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZRS(cCsLt|\}}}}}||_||_||_||_||_dS(s8 Parse the AFM file in file object *fh* N(Rgt_headert_kernt_metricst_metrics_by_namet _composite(tselfRRcRdRet dkernpairst dcomposite((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt__init__"s     cCs1|pt|}n|i|\}}}|S(N(tordRk(RntctisordRKRLRM((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_bbox_char/scCs t|pdSd}d}d}d}x|D]}|djoq1n|it|\}}} | \} } } } y|i||f}Wntj o d}nX|||7}| | }||jo |}n| }||jo |}q1q1W|||fS(sn Return the string width (including kerning) and string height as a (*w*, *h*) tuple. igeAs (iiN(R8tNoneRkRrRjR<(RnRttotalwtnamelasttminytmaxyRsRKRLRMRatbtwthtkptthismaxtthismin((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytstring_width_height4s0      c Cst|pdSd}d}d}d}d}t|tp|i}nx(|D] }|djoqWntit|d}y|i|\} } Wn,t j o d}|i|\} } nX| \} } } }| |jo | }ny|i ||f}Wnt j o d}nX|| |7}| |}||jo |}n| }||jo |}qWqWW|||||| fS(s0 Return the string bounding box igeAs tquestion(iiiiN( R8Rvt isinstancetunicodetdecodeRtgetRrRlR<Rj(RnRRwRxRyRztleftRsRLRKRMRaR{R|R}R~RR((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_str_bbox_and_descentRsD       cCs|i|d S(s0 Return the string bounding box i(R(RnR((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_str_bboxxscCs1|pt|}n|i|\}}}|S(sG Get the name of the character, ie, ';' is 'semicolon' (RrRk(RnRsRtRKRLRM((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_name_char~scCs1|pt|}n|i|\}}}|S(s[ Get the width of the character from the character metric WX field (RrRk(RnRsRtRKRLRM((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_width_charscCs|i|\}}|S(sL Get the width of the character from a type1 character name (Rl(RnRLRKRM((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_width_from_char_namescCs5|pt|}n|i|\}}}|dS(su Get the height of character *c* from the bounding box. This is the ink height (space is 0) i(RrRk(RnRsRtRKRLRM((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_height_charscCs/|i||i|}}|i||S(s_ Return the kerning pair distance (possibly 0) for chars *c1* and *c2* (Rtget_kern_dist_from_name(RnRRRStname1tname2((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_kern_distscCs$y|i||fSWndSXdS(se Return the kerning pair distance (possibly 0) for chars *name1* and *name2* iN(Rj(RnRR((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyRscCs |idS(s'Return the font name, eg, 'Times-Roman'R(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_fontnamescCs4|iid}|djo|id}n|S(s,Return the font full name, eg, 'Times-Roman'RRN(RiRRv(RnRL((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_fullnames cCsI|iid}|dj o|S|i}d}ti|d|S(s(Return the font family name, eg, 'Times'R sY(?i)([ -](regular|plain|italic|oblique|bold|semibold|light|ultralight|extra|condensed))+$R5N(RiRRvRtretsub(RnRLtextras((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_familynames   cCs |idS(s-Return the font weight, eg, 'Bold' or 'Roman'R!(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_weightscCs |idS(sReturn the fontangle as floatR"(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_anglescCs |idS(sReturn the cap height as floatR*(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_capheightscCs |idS(sReturn the xheight as floatR,(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt get_xheightscCs |idS(s'Return the underline thickness as floatR&(Ri(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_underline_thicknessscCs|iiddS(su Return the standard horizontal stem width as float, or *None* if not specified in AFM file. R/N(RiRRv(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_horizontal_stem_widthscCs|iiddS(ss Return the standard vertical stem width as float, or *None* if not specified in AFM file. R0N(RiRRv(Rn((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pytget_vertical_stem_widths(t__name__t __module__RqRRuRRRRRRRRRRRRRRRRRRR(((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyRh s*   &             t__main__s!/usr/local/share/fonts/afms/adobesJohn Hunter is the Man!((#t__doc__R:tosRt_mathtext_dataRRFRtfloatR tstrR6R R RRRARNRTR]RbRgRhRtpathnametlistdirtfnametfiletpathtjoinRtafmRR|R}(((s4/usr/lib64/python2.6/site-packages/matplotlib/afm.pyt#s.$     D " "