Download Latest Version endpoint-rule-set-1.json.gz (1.3 kB)
Email in envelope

Get an email when there's a new version of aws

Home / ShadowClone / env / lib / python3.8 / site-packages / fontTools / … / __pycache__
Name Modified Size InfoDownloads / Week
Parent folder
__init__.cpython-38.pyc 2023-08-12 3.5 kB
_a_n_k_r.cpython-38.pyc 2023-08-12 750 Bytes
_a_v_a_r.cpython-38.pyc 2023-08-12 5.0 kB
_b_s_l_n.cpython-38.pyc 2023-08-12 368 Bytes
_c_i_d_g.cpython-38.pyc 2023-08-12 1.1 kB
_c_m_a_p.cpython-38.pyc 2023-08-12 36.1 kB
_c_v_a_r.cpython-38.pyc 2023-08-12 3.4 kB
_c_v_t.cpython-38.pyc 2023-08-12 2.1 kB
_f_e_a_t.cpython-38.pyc 2023-08-12 848 Bytes
_f_p_g_m.cpython-38.pyc 2023-08-12 1.8 kB
_f_v_a_r.cpython-38.pyc 2023-08-12 7.7 kB
_g_a_s_p.cpython-38.pyc 2023-08-12 1.9 kB
_g_c_i_d.cpython-38.pyc 2023-08-12 368 Bytes
_g_l_y_f.cpython-38.pyc 2023-08-12 65.8 kB
_g_v_a_r.cpython-38.pyc 2023-08-12 8.6 kB
_h_d_m_x.cpython-38.pyc 2023-08-12 4.2 kB
_h_e_a_d.cpython-38.pyc 2023-08-12 3.6 kB
_h_h_e_a.cpython-38.pyc 2023-08-12 3.9 kB
_h_m_t_x.cpython-38.pyc 2023-08-12 4.2 kB
_k_e_r_n.cpython-38.pyc 2023-08-12 8.0 kB
_l_c_a_r.cpython-38.pyc 2023-08-12 368 Bytes
_l_o_c_a.cpython-38.pyc 2023-08-12 2.4 kB
_l_t_a_g.cpython-38.pyc 2023-08-12 2.5 kB
_m_a_x_p.cpython-38.pyc 2023-08-12 3.9 kB
_m_e_t_a.cpython-38.pyc 2023-08-12 2.9 kB
_m_o_r_t.cpython-38.pyc 2023-08-12 368 Bytes
_m_o_r_x.cpython-38.pyc 2023-08-12 368 Bytes
_n_a_m_e.cpython-38.pyc 2023-08-12 27.3 kB
_o_p_b_d.cpython-38.pyc 2023-08-12 368 Bytes
_p_o_s_t.cpython-38.pyc 2023-08-12 8.1 kB
_p_r_e_p.cpython-38.pyc 2023-08-12 405 Bytes
_p_r_o_p.cpython-38.pyc 2023-08-12 368 Bytes
_s_b_i_x.cpython-38.pyc 2023-08-12 3.5 kB
_t_r_a_k.cpython-38.pyc 2023-08-12 9.5 kB
_v_h_e_a.cpython-38.pyc 2023-08-12 3.5 kB
_v_m_t_x.cpython-38.pyc 2023-08-12 526 Bytes
asciiTable.cpython-38.pyc 2023-08-12 989 Bytes
B_A_S_E_.cpython-38.pyc 2023-08-12 368 Bytes
BitmapGlyphMetrics.cpython-38.pyc 2023-08-12 1.9 kB
C_B_D_T_.cpython-38.pyc 2023-08-12 3.5 kB
C_B_L_C_.cpython-38.pyc 2023-08-12 398 Bytes
C_F_F_.cpython-38.pyc 2023-08-12 2.1 kB
C_F_F__2.cpython-38.pyc 2023-08-12 887 Bytes
C_O_L_R_.cpython-38.pyc 2023-08-12 5.2 kB
C_P_A_L_.cpython-38.pyc 2023-08-12 9.5 kB
D__e_b_g.cpython-38.pyc 2023-08-12 1.1 kB
D_S_I_G_.cpython-38.pyc 2023-08-12 4.4 kB
DefaultTable.cpython-38.pyc 2023-08-12 2.2 kB
E_B_D_T_.cpython-38.pyc 2023-08-12 20.9 kB
E_B_L_C_.cpython-38.pyc 2023-08-12 20.3 kB
F__e_a_t.cpython-38.pyc 2023-08-12 4.5 kB
F_F_T_M_.cpython-38.pyc 2023-08-12 1.7 kB
G__l_a_t.cpython-38.pyc 2023-08-12 7.2 kB
G__l_o_c.cpython-38.pyc 2023-08-12 3.0 kB
G_D_E_F_.cpython-38.pyc 2023-08-12 368 Bytes
G_M_A_P_.cpython-38.pyc 2023-08-12 4.1 kB
G_P_K_G_.cpython-38.pyc 2023-08-12 3.2 kB
G_P_O_S_.cpython-38.pyc 2023-08-12 368 Bytes
G_S_U_B_.cpython-38.pyc 2023-08-12 368 Bytes
grUtils.cpython-38.pyc 2023-08-12 2.6 kB
H_V_A_R_.cpython-38.pyc 2023-08-12 368 Bytes
J_S_T_F_.cpython-38.pyc 2023-08-12 368 Bytes
L_T_S_H_.cpython-38.pyc 2023-08-12 1.8 kB
M_A_T_H_.cpython-38.pyc 2023-08-12 368 Bytes
M_E_T_A_.cpython-38.pyc 2023-08-12 7.8 kB
M_V_A_R_.cpython-38.pyc 2023-08-12 368 Bytes
O_S_2f_2.cpython-38.pyc 2023-08-12 18.1 kB
otBase.cpython-38.pyc 2023-08-12 38.7 kB
otConverters.cpython-38.pyc 2023-08-12 60.0 kB
otData.cpython-38.pyc 2023-08-12 79.4 kB
otTables.cpython-38.pyc 2023-08-12 59.6 kB
otTraverse.cpython-38.pyc 2023-08-12 5.2 kB
S__i_l_f.cpython-38.pyc 2023-08-12 26.6 kB
S__i_l_l.cpython-38.pyc 2023-08-12 3.0 kB
S_I_N_G_.cpython-38.pyc 2023-08-12 3.0 kB
S_T_A_T_.cpython-38.pyc 2023-08-12 368 Bytes
S_V_G_.cpython-38.pyc 2023-08-12 5.5 kB
sbixGlyph.cpython-38.pyc 2023-08-12 3.5 kB
sbixStrike.cpython-38.pyc 2023-08-12 3.8 kB
T_S_I__0.cpython-38.pyc 2023-08-12 2.1 kB
T_S_I__1.cpython-38.pyc 2023-08-12 3.6 kB
T_S_I__2.cpython-38.pyc 2023-08-12 729 Bytes
T_S_I__3.cpython-38.pyc 2023-08-12 733 Bytes
T_S_I__5.cpython-38.pyc 2023-08-12 1.9 kB
T_S_I_B_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_C_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_D_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_J_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_P_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_S_.cpython-38.pyc 2023-08-12 368 Bytes
T_S_I_V_.cpython-38.pyc 2023-08-12 1.0 kB
T_T_F_A_.cpython-38.pyc 2023-08-12 358 Bytes
ttProgram.cpython-38.pyc 2023-08-12 17.4 kB
TupleVariation.cpython-38.pyc 2023-08-12 20.0 kB
V_D_M_X_.cpython-38.pyc 2023-08-12 5.8 kB
V_O_R_G_.cpython-38.pyc 2023-08-12 5.1 kB
V_V_A_R_.cpython-38.pyc 2023-08-12 368 Bytes
Totals: 97 Items   709.7 kB 0
This folder is a subpackage of ttLib. Each module here is a 
specialized TT/OT table converter: they can convert raw data 
to Python objects and vice versa. Usually you don't need to 
use the modules directly: they are imported and used 
automatically when needed by ttLib.

If you are writing you own table converter the following is 
important.

The modules here have pretty strange names: this is due to the 
fact that we need to map TT table tags (which are case sensitive) 
to filenames (which on Mac and Win aren't case sensitive) as well 
as to Python identifiers. The latter means it can only contain 
[A-Za-z0-9_] and cannot start with a number. 

ttLib provides functions to expand a tag into the format used here:

>>> from fontTools import ttLib
>>> ttLib.tagToIdentifier("FOO ")
'F_O_O_'
>>> ttLib.tagToIdentifier("cvt ")
'_c_v_t'
>>> ttLib.tagToIdentifier("OS/2")
'O_S_2f_2'
>>> ttLib.tagToIdentifier("glyf")
'_g_l_y_f'
>>> 

And vice versa:

>>> ttLib.identifierToTag("F_O_O_")
'FOO '
>>> ttLib.identifierToTag("_c_v_t")
'cvt '
>>> ttLib.identifierToTag("O_S_2f_2")
'OS/2'
>>> ttLib.identifierToTag("_g_l_y_f")
'glyf'
>>> 

Eg. the 'glyf' table converter lives in a Python file called:

	_g_l_y_f.py

The converter itself is a class, named "table_" + expandedtag. Eg:

	class table__g_l_y_f:
		etc.

Note that if you _do_ need to use such modules or classes manually, 
there are two convenient API functions that let you find them by tag:

>>> ttLib.getTableModule('glyf')
<module 'ttLib.tables._g_l_y_f'>
>>> ttLib.getTableClass('glyf')
<class ttLib.tables._g_l_y_f.table__g_l_y_f at 645f400>
>>> 

You must subclass from DefaultTable.DefaultTable. It provides some default
behavior, as well as a constructor method (__init__) that you don't need to 
override.

Your converter should minimally provide two methods:

class table_F_O_O_(DefaultTable.DefaultTable): # converter for table 'FOO '
	
	def decompile(self, data, ttFont):
		# 'data' is the raw table data. Unpack it into a
		# Python data structure.
		# 'ttFont' is a ttLib.TTfile instance, enabling you to
		# refer to other tables. Do ***not*** keep a reference to
		# it: it will cause a circular reference (ttFont saves 
		# a reference to us), and that means we'll be leaking 
		# memory. If you need to use it in other methods, just 
		# pass it around as a method argument.
	
	def compile(self, ttFont):
		# Return the raw data, as converted from the Python
		# data structure. 
		# Again, 'ttFont' is there so you can access other tables.
		# Same warning applies.

If you want to support TTX import/export as well, you need to provide two
additional methods:

	def toXML(self, writer, ttFont):
		# XXX
	
	def fromXML(self, (name, attrs, content), ttFont):
		# XXX

Source: table_API_readme.txt, updated 2023-08-12