Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
reportlab /
pdfbase /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
acroform.py
44.61
KB
-rw-r--r--
_can_cmap_data.py
1.75
KB
-rw-r--r--
_cidfontdata.py
31.29
KB
-rw-r--r--
cidfonts.py
18.38
KB
-rw-r--r--
_fontdata_enc_macexpert.py
2.99
KB
-rw-r--r--
_fontdata_enc_macroman.py
2.87
KB
-rw-r--r--
_fontdata_enc_pdfdoc.py
2.25
KB
-rw-r--r--
_fontdata_enc_standard.py
1.79
KB
-rw-r--r--
_fontdata_enc_symbol.py
3.11
KB
-rw-r--r--
_fontdata_enc_winansi.py
2.93
KB
-rw-r--r--
_fontdata_enc_zapfdingbats.py
2.17
KB
-rw-r--r--
_fontdata.py
8.35
KB
-rw-r--r--
_fontdata_widths_courierboldoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_courierbold.py
3.58
KB
-rw-r--r--
_fontdata_widths_courieroblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_courier.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticaboldoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticabold.py
3.58
KB
-rw-r--r--
_fontdata_widths_helveticaoblique.py
3.58
KB
-rw-r--r--
_fontdata_widths_helvetica.py
3.58
KB
-rw-r--r--
_fontdata_widths_symbol.py
3.29
KB
-rw-r--r--
_fontdata_widths_timesbolditalic.py
3.58
KB
-rw-r--r--
_fontdata_widths_timesbold.py
3.59
KB
-rw-r--r--
_fontdata_widths_timesitalic.py
3.58
KB
-rw-r--r--
_fontdata_widths_timesroman.py
3.58
KB
-rw-r--r--
_fontdata_widths_zapfdingbats.py
2.67
KB
-rw-r--r--
_glyphlist.py
105.92
KB
-rw-r--r--
__init__.py
275
B
-rw-r--r--
pdfdoc.py
88.02
KB
-rw-r--r--
pdfform.py
15.34
KB
-rw-r--r--
pdfmetrics.py
29.23
KB
-rw-r--r--
pdfpattern.py
3.67
KB
-rw-r--r--
pdfutils.py
9.9
KB
-rw-r--r--
rl_codecs.py
55.1
KB
-rw-r--r--
ttfonts.py
51.88
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : _can_cmap_data.py
# """ 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'\u6771\u4EAC', 10) 20.0 >>> """ from reportlab.pdfbase._cidfontdata import defaultUnicodeEncodings from reportlab.pdfbase.cidfonts import UnicodeCIDFont def run(): buf = [] buf.append('widthsByUnichar = {}') for fontName, (language, encName) in defaultUnicodeEncodings.items(): print('handling %s : %s : %s' % (fontName, language, encName)) #this does just about all of it for us, as all the info #we need is present. font = UnicodeCIDFont(fontName) widthsByCID = font.face._explicitWidths cmap = font.encoding._cmap nonStandardWidthsByUnichar = {} for codePoint, cid in cmap.items(): width = widthsByCID.get(cid, 1000) if width != 1000: nonStandardWidthsByUnichar[chr(codePoint)] = width print('created font width map (%d items). ' % len(nonStandardWidthsByUnichar)) buf.append('widthsByUnichar["%s"] = %s' % (fontName, repr(nonStandardWidthsByUnichar))) src = '\n'.join(buf) + '\n' open('canned_widths.py','w').write(src) print('wrote canned_widths.py') if __name__=='__main__': run()
Close