+
    f7i  c                   s    ^ RI Ht ^ RIHtHtHt ^RIHt ^RIH	t	 Rt
]P                  ! ]
4      tRt]P                  ! ]4      t ! R R]P                  4      t ! R	 R
]4      tR# )i    )sstruct)safeEval
num2binary
binary2num)DefaultTable)Strikea  
	>
	version:       H	# Version number (set to 1)
	flags:         H	# The only two bits used in the flags field are bits 0
						# and 1. For historical reasons, bit 0 must always be 1.
						# Bit 1 is a sbixDrawOutlines flag and is interpreted as
						# follows:
						#     0: Draw only 'sbix' bitmaps
						#     1: Draw both 'sbix' bitmaps and outlines, in that
						#        order
	numStrikes:    L	# Number of bitmap strikes to follow
z`
	>
	strikeOffset:  L	# Offset from begining of table to data for the
						# individual strike
c                   sF   a  ] tR t^t o RtR	R ltR tR tR tR t	Rt
V tR# )
table__s_b_i_xa  Standard Bitmap Graphics table

The ``sbix`` table stores bitmap image data in standard graphics formats
like JPEG, PNG, or TIFF. The glyphs for which the ``sbix`` table provides
data are indexed by Glyph ID. For each such glyph, the ``sbix`` table can
hold different data for different sizes, called "strikes."

See also https://learn.microsoft.com/en-us/typography/opentype/spec/sbix
Nc                s    \         P                   P                  W4       ^V n        ^V n        ^ V n        / V n        . V n        R# )i   N)r   __init__versionflags
numStrikesstrikesstrikeOffsets)selfZtags   &&F/usr/lib64/python3.14/site-packages/fontTools/ttLib/tables/_s_b_i_x.pyr   Ztable__s_b_i_x.__init__)   s:    !!**45
    c                s   \         P                  ! \        VR \         V 4       \	        V P
                  4       Fs  p\        V\        ,          ,           p\        4       p\         P                  ! \        WV\        ,            V4       V P                  P                  VP                  4       Ku  	  \	        V P
                  ^,
          RR4       F  p\        WP                  V,          R  R7      pVR V P                  V,           pVP                  V4       VP                  V P                  9   d   ^ RIHp VP%                  R4      hW`P                  VP                  &   K  	  V =	V =R # )N)ZrawdatattLibz+Pixel 'ppem' must be unique for each Strikei)r    ZunpacksbixHeaderFormatsbixHeaderFormatSizeZranger
   sbixStrikeOffsetFormatSizesbixStrikeOffsetsbixStrikeOffsetFormatr   ZappendstrikeOffsetr   	decompileppemr   	fontToolsr   
TTLibError)r   datattFontiZcurrent_offsetZoffset_entrycurrent_striker   s   &&&     r   r   Ztable__s_b_i_x.decompile1   s*   '.C/C)DdKt'A1A8R4RRN+-LNN&n7Q&QR
 %%l&?&?@ ( t*B3A#D1C1CA1F1H,IJN/$,,Q/0D$$V, ""dll2+&&'TUU0>LL,,- 4 Or   c                s   R p\        V P                  4      V n        \        P                  ! \
        V 4      p\        \        V P                  ,          ,           p\        V P                  P                  4       4       F}  pV P                  V,          pVP                  V4       WFn        V\        P                  ! \        V4      ,          pV\        VP                  4      ,          pW&P                  ,          pK  	  W2,           # )r   )Zlenr   r
   r    Zpackr   r   r   sortedkeyscompiler   r   r   )r   r   ZsbixDataZ
sbixHeaderZ	setOffsetZsir   s   &&     r   r"   Ztable__s_b_i_x.compileP   s    dll+\\"2D9
 )+E+WW	**,-B!\\"-N""6**3'',,'=~NNJ^0011I+++H . $$r   c                sf   VP                  R V P                  R7       VP                  4        VP                  R\        V P                  ^4      R7       VP                  4        \        V P                  P                  4       4       F%  pV P                  V,          P                  W4       K'  	  R# )r   )valuer	   N)	Z	simpletagr   Znewliner   r	   r    r   r!   toXML)r   Z	xmlWriterr   r   s   &&& r   r$   Ztable__s_b_i_x.toXMLc   s    IT\\:G:djj"+EF))+,ALLO!!)4 -r   c                s   VR 8X  d   \        W\        VR,          4      4       R# VR8X  d   \        W\        VR,          4      4       R# VR8X  d]   \        4       pV F2  p\	        V\
        4      '       g   K  Vw  rpVP                  WW44       K4  	  WPP                  VP                  &   R# ^ RI	H
p VP                  RV,          4      h)r   r#   r	   Zstriker   zcan't handle '%s' elementN)Zsetattrr   r   r   Z
isinstanceZtuplefromXMLr   r   r   r   r   )r   ZnameZattrsZcontentr   r   Zelementr   s   &&&&&   r   r%   Ztable__s_b_i_x.fromXMLk   s    9Dw 89W_D
5> :;X#XN"gu--+2(D"**4H # 1?LL,,-'""#>#EFFr   )r	   r
   r   r   r   )N)__name__
__module____qualname____firstlineno__Z__doc__r   r   r"   r$   r%   __static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s*      >%&5G Gr   r   c                   s    ] tR t^tRtR# )r    N)r&   r'   r(   r)   r*   r+   r   r   r   r      s    r   r   N)ZfontTools.miscr    ZfontTools.misc.textToolsr   r   r   Z r   Z
sbixStriker   r   Zcalcsizer   r   r   r   Zobjectr   r+   r   r   <module>r,      so    " E E    ''(89  
 %--.DE \G\.. \GD	v 	r   