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

Name Modified Size InfoDownloads / Week
Parent folder
__pycache__ 2023-09-02
__init__.py 2023-08-12 2.6 kB
_a_n_k_r.py 2023-08-12 462 Bytes
_a_v_a_r.py 2023-08-12 5.4 kB
_b_s_l_n.py 2023-08-12 170 Bytes
_c_i_d_g.py 2023-08-12 787 Bytes
_c_m_a_p.py 2023-08-12 61.6 kB
_c_v_a_r.py 2023-08-12 3.3 kB
_c_v_t.py 2023-08-12 1.4 kB
_f_e_a_t.py 2023-08-12 560 Bytes
_f_p_g_m.py 2023-08-12 1.2 kB
_f_v_a_r.py 2023-08-12 8.5 kB
_g_a_s_p.py 2023-08-12 1.9 kB
_g_c_i_d.py 2023-08-12 170 Bytes
_g_l_y_f.py 2023-08-12 95.4 kB
_g_v_a_r.py 2023-08-12 10.2 kB
_h_d_m_x.py 2023-08-12 4.0 kB
_h_e_a_d.py 2023-08-12 4.7 kB
_h_h_e_a.py 2023-08-12 4.4 kB
_h_m_t_x.py 2023-08-12 5.8 kB
_k_e_r_n.py 2023-08-12 10.4 kB
_l_c_a_r.py 2023-08-12 88 Bytes
_l_o_c_a.py 2023-08-12 2.0 kB
_l_t_a_g.py 2023-08-12 2.3 kB
_m_a_x_p.py 2023-08-12 5.1 kB
_m_e_t_a.py 2023-08-12 3.7 kB
_m_o_r_t.py 2023-08-12 170 Bytes
_m_o_r_x.py 2023-08-12 170 Bytes
_n_a_m_e.py 2023-08-12 40.7 kB
_o_p_b_d.py 2023-08-12 170 Bytes
_p_o_s_t.py 2023-08-12 11.3 kB
_p_r_e_p.py 2023-08-12 115 Bytes
_p_r_o_p.py 2023-08-12 170 Bytes
_s_b_i_x.py 2023-08-12 4.4 kB
_t_r_a_k.py 2023-08-12 11.1 kB
_v_h_e_a.py 2023-08-12 4.1 kB
_v_m_t_x.py 2023-08-12 230 Bytes
asciiTable.py 2023-08-12 637 Bytes
B_A_S_E_.py 2023-08-12 88 Bytes
BitmapGlyphMetrics.py 2023-08-12 1.8 kB
C_B_D_T_.py 2023-08-12 3.3 kB
C_B_L_C_.py 2023-08-12 189 Bytes
C_F_F_.py 2023-08-12 1.4 kB
C_F_F__2.py 2023-08-12 425 Bytes
C_O_L_R_.py 2023-08-12 5.7 kB
C_P_A_L_.py 2023-08-12 11.6 kB
D__e_b_g.py 2023-08-12 433 Bytes
D_S_I_G_.py 2023-08-12 5.3 kB
DefaultTable.py 2023-08-12 1.5 kB
E_B_D_T_.py 2023-08-12 32.1 kB
E_B_L_C_.py 2023-08-12 29.8 kB
F__e_a_t.py 2023-08-12 5.4 kB
F_F_T_M_.py 2023-08-12 1.4 kB
G__l_a_t.py 2023-08-12 8.6 kB
G__l_o_c.py 2023-08-12 2.6 kB
G_D_E_F_.py 2023-08-12 88 Bytes
G_M_A_P_.py 2023-08-12 4.5 kB
G_P_K_G_.py 2023-08-12 4.4 kB
G_P_O_S_.py 2023-08-12 88 Bytes
G_S_U_B_.py 2023-08-12 88 Bytes
grUtils.py 2023-08-12 2.3 kB
H_V_A_R_.py 2023-08-12 88 Bytes
J_S_T_F_.py 2023-08-12 88 Bytes
L_T_S_H_.py 2023-08-12 1.8 kB
M_A_T_H_.py 2023-08-12 88 Bytes
M_E_T_A_.py 2023-08-12 11.8 kB
M_V_A_R_.py 2023-08-12 88 Bytes
O_S_2f_2.py 2023-08-12 22.8 kB
otBase.py 2023-08-12 52.7 kB
otConverters.py 2023-08-12 69.2 kB
otData.py 2023-08-12 192.6 kB
otTables.py 2023-08-12 82.0 kB
otTraverse.py 2023-08-12 5.5 kB
S__i_l_f.py 2023-08-12 34.9 kB
S__i_l_l.py 2023-08-12 3.1 kB
S_I_N_G_.py 2023-08-12 3.1 kB
S_T_A_T_.py 2023-08-12 88 Bytes
S_V_G_.py 2023-08-12 7.5 kB
sbixGlyph.py 2023-08-12 5.6 kB
sbixStrike.py 2023-08-12 6.7 kB
T_S_I__0.py 2023-08-12 2.0 kB
T_S_I__1.py 2023-08-12 7.0 kB
T_S_I__2.py 2023-08-12 420 Bytes
T_S_I__3.py 2023-08-12 467 Bytes
T_S_I__5.py 2023-08-12 1.5 kB
T_S_I_B_.py 2023-08-12 86 Bytes
T_S_I_C_.py 2023-08-12 88 Bytes
T_S_I_D_.py 2023-08-12 86 Bytes
T_S_I_J_.py 2023-08-12 86 Bytes
T_S_I_P_.py 2023-08-12 86 Bytes
T_S_I_S_.py 2023-08-12 86 Bytes
T_S_I_V_.py 2023-08-12 655 Bytes
T_T_F_A_.py 2023-08-12 81 Bytes
table_API_readme.txt 2023-08-12 2.7 kB
ttProgram.py 2023-08-12 35.9 kB
TupleVariation.py 2023-08-12 29.5 kB
V_D_M_X_.py 2023-08-12 10.2 kB
V_O_R_G_.py 2023-08-12 5.8 kB
V_V_A_R_.py 2023-08-12 88 Bytes
Totals: 99 Items   1.0 MB 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