
    hG                     P    S r SSKJr  SSKrSrS r " S S\R                  5      rg)	ag  TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI0 is the index table containing the lengths and offsets for the glyph
programs and 'extra' programs ('fpgm', 'prep', and 'cvt') that are contained
in the TSI1 table.

See also https://learn.microsoft.com/en-us/typography/tools/vtt/tsi-tables
   )DefaultTable    Nz>HHLc                 0    [        U 5      [        U5      U4$ N)int)glyphID
textLength
textOffsets      Q/var/www/html/env/lib/python3.13/site-packages/fontTools/ttLib/tables/T_S_I__0.pyfixlongsr      s    w<Z*44    c                   2    \ rS rSrS/rS rS rS rS rSr	g)	table_T_S_I__0   TSI1c           	      j   US   R                   n/ n[        R                  " [        5      n[	        US-   5       HA  n[        [        R                  " [        US U 5      6 u  pxn	UR                  XxU	45        XS  nMC     [        U5      S:X  d   eUS   S:X  d   S5       eUS S U l	        USS  U l
        g )Nmaxp   r   )  r      4W zbad magic number)	numGlyphsstructcalcsize
tsi0Formatranger   unpackappendlenindicesextra_indices)
selfdatattFontr   r!   sizeir   r	   r
   s
             r   	decompiletable_T_S_I__0.decompile   s    6N,,	z*y1}%A.6z4;7/+G NNG<=;D & 4yA~~r{55I7II5s|$RS\r   c                 B   [        U S5      (       d  gSnU R                   H%  u  p4nU[        R                  " [        X4U5      -   nM'     U[        R                  " [        SSS5      -   nU R
                   H%  u  p4nU[        R                  " [        X4U5      -   nM'     U$ )Nr!   r   r   r   r   )hasattrr!   r   packr   r"   )r#   r%   r$   indexr	   r
   s         r   compiletable_T_S_I__0.compile'   s    tY'' -1\\)Ez&++j%ZPPD .:fkk*faDD-1-?-?)Ez&++j%ZPPD .@r   c                     Xl         X l        g r   )r!   r"   )r#   r!   r"   s      r   settable_T_S_I__0.set4   s    *r   c                 F    UR                  S5        UR                  5         g )Nz-This table will be calculated by the compiler)commentnewline)r#   writerr%   s      r   toXMLtable_T_S_I__0.toXML9   s    FGr   )r"   r!   N)
__name__
__module____qualname____firstlineno__dependenciesr(   r.   r1   r7   __static_attributes__ r   r   r   r      s    8L*+
r   r   )__doc__ r   r   r   r   r   r?   r   r   <module>rB      s.     
5&\.. &r   